/* V868: calm, app-like team and daily-schedule workspace. */
.team-page-head{margin-bottom:14px;padding:18px 20px;border:1px solid #dce9f5;border-radius:24px;background:linear-gradient(135deg,#fff 0%,#f4f9ff 58%,#effcf8 100%);box-shadow:0 16px 42px rgba(17,65,108,.08)}
.team-page-head h2{margin:0;color:#0d345f;letter-spacing:-.025em}.team-page-head p{max-width:720px;margin:5px 0 0;line-height:1.55}.team-page-head .section-actions{display:flex;flex-wrap:wrap;gap:8px}.team-page-head .section-actions button{min-height:44px;border-radius:14px}
.team-kpis article{position:relative;overflow:hidden;border-color:#dce8f3;background:linear-gradient(145deg,#fff,#f8fbff);box-shadow:0 10px 30px rgba(19,61,99,.07)}.team-kpis article::after{content:"";position:absolute;inset:auto -22px -30px auto;width:74px;height:74px;border-radius:50%;background:rgba(25,136,224,.07)}
.team-toolbar{position:sticky;top:8px;z-index:3;border-color:#d9e8f4;background:rgba(255,255,255,.94);box-shadow:0 14px 36px rgba(22,64,101,.09);backdrop-filter:blur(14px);scroll-margin-top:8px}
.worker-grid{gap:16px}.worker-card{border-color:#dbe7f1;border-radius:24px;padding:18px;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);box-shadow:0 14px 40px rgba(18,57,91,.075)!important}.worker-card::before{content:"";position:absolute;inset:0 0 auto;height:4px;background:linear-gradient(90deg,#0ab68a,#2187db);opacity:.85}.worker-card .entity-head h3{font-size:1.12rem;line-height:1.35}.worker-card .entity-head small{display:block;margin-top:5px;line-height:1.5}.worker-card .commission-chip{border:1px solid #cfe2f7;background:#f0f7ff;color:#0d5eae;line-height:1.35}
.worker-kpis>div,.worker-money>div{border:1px solid #e3edf5;background:#fff}.worker-money{border:1px solid #dbeaf6;background:linear-gradient(135deg,#f2f8ff,#f3fcf8)}.worker-next-job{border:1px solid #e0ebf4;background:#f7fafc;color:#39536d}
.worker-quick-actions button{border-radius:14px;transition:transform .16s ease,box-shadow .16s ease,filter .16s ease}.worker-quick-actions button:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(17,81,137,.11)}
.worker-management-details{border-color:#d7e5f0;border-radius:18px;background:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}.worker-management-details summary{min-height:58px;padding:14px 16px;background:linear-gradient(135deg,#f5f9ff,#f3fbf8);outline:none}.worker-management-details summary:focus-visible{box-shadow:inset 0 0 0 3px rgba(18,125,220,.18)}.worker-management-details[open]{border-color:#9fc9ed;box-shadow:0 10px 28px rgba(24,81,131,.08)}.worker-management-body{display:grid;gap:10px;padding:15px;background:#fcfdff;animation:teamDetailsOpen .18s ease-out both}.worker-management-heading{margin:5px 0 0;padding:9px 11px;border-radius:12px;background:#eef6fd;color:#174d7d;font-size:.88rem}.worker-portal-path,.worker-day-closure,.employee-login-security,.worker-management-body .security-note{border-radius:14px}.worker-management-body .entity-actions.worker-actions{gap:9px}.worker-management-body .entity-actions.worker-actions button{border-radius:13px}
.daily-schedule-dialog{border:1px solid #d7e6f2;border-radius:26px;box-shadow:0 30px 90px rgba(4,34,66,.23)}.daily-schedule-dialog .daily-schedule-modal{scrollbar-gutter:stable;overscroll-behavior:contain;scroll-behavior:auto}.daily-schedule-dialog .daily-schedule-modal-head{background:linear-gradient(180deg,#fff 82%,rgba(255,255,255,.88));border-bottom:1px solid #e7eef5}.employee-schedule-history-tools{border-radius:17px;box-shadow:0 7px 18px rgba(19,79,126,.06)}.daily-schedule-dialog .daily-schedule-card{border-color:#dce8f2;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:0 8px 24px rgba(21,62,98,.06)}
@keyframes teamDetailsOpen{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media(max-width:720px){.team-page-head{padding:15px;border-radius:20px}.team-page-head,.team-page-head .section-actions{display:grid;grid-template-columns:1fr}.team-page-head .section-actions button{width:100%}.team-toolbar{top:4px;border-radius:17px}.worker-card{padding:14px;border-radius:20px}.worker-quick-actions{gap:7px}.worker-quick-actions button{min-height:48px;padding-inline:8px}.daily-schedule-dialog{border-radius:24px 24px 0 0}.daily-schedule-dialog .daily-schedule-modal{scrollbar-gutter:auto}.employee-schedule-history-tools{position:sticky;top:0;z-index:2;background:#f4fbff}}
@media(prefers-reduced-motion:reduce){.worker-management-body{animation:none!important}.worker-quick-actions button{transition:none!important}}
.daily-schedule-dialog{width:min(820px,calc(100vw - 36px))}
.daily-schedule-dialog .daily-schedule-modal{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
@media(max-width:900px){.daily-schedule-dialog .daily-schedule-modal{grid-template-columns:1fr}}
/* Keep day actions readable inside narrow cards, including desktop columns. */
.daily-schedule-dialog .daily-schedule-card:only-child{grid-column:1/-1}
.daily-schedule-dialog .daily-schedule-card>footer{display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch}
.daily-schedule-dialog .daily-schedule-card>footer button{width:100%;min-width:0;min-height:44px}
.employee-schedule-history-tools>.employee-schedule-sort{display:flex;grid-column:1/-1;gap:8px}

/* V896: one workday per row, calm controls and readable collection forms. */
/* Long historical summaries must wrap inside each card at phone widths. */
.daily-schedule-dialog .daily-schedule-card,.daily-schedule-dialog .daily-schedule-card *{min-width:0;box-sizing:border-box}
.daily-schedule-dialog .daily-schedule-card :is(h3,p,small,b,strong,em,span,button){overflow-wrap:anywhere;white-space:normal}
.daily-schedule-dialog .daily-schedule-financial-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.daily-schedule-dialog .daily-schedule-financial-grid>span{display:flex;flex-direction:column;gap:6px;max-width:100%}
.daily-schedule-dialog .daily-schedule-kpis{flex-wrap:wrap}
.daily-schedule-dialog .daily-schedule-card>header{flex-wrap:wrap}
.daily-schedule-dialog .employee-schedule-sort{flex-wrap:wrap;min-width:0}
@media(max-width:600px){.daily-schedule-dialog .daily-schedule-financial-grid{grid-template-columns:minmax(0,1fr)}.daily-schedule-dialog .daily-schedule-job{grid-template-columns:repeat(2,minmax(0,1fr))}}
.daily-schedule-dialog{width:min(880px,calc(100vw - 32px));border-radius:20px;background:#fff}
.daily-schedule-dialog .daily-schedule-modal{display:flex;flex-direction:column;gap:18px;background:#f6f8f9;padding:16px}
.daily-schedule-dialog .daily-schedule-card{width:100%;min-width:0;border:1px solid #e3e8eb;border-radius:16px;background:#fff;box-shadow:none;padding:20px}
.daily-schedule-dialog .daily-schedule-card>header{align-items:flex-start;gap:12px;border-bottom:1px solid #edf0f2;padding-bottom:14px}
.daily-schedule-dialog .daily-schedule-card h3{font-size:1.2rem;line-height:1.5}
.daily-schedule-dialog .daily-schedule-kpis{display:flex;gap:18px;background:none;padding:12px 0}
.daily-schedule-dialog .daily-schedule-kpis span{border:0;border-radius:0;background:none;padding:0}
.daily-schedule-dialog .daily-schedule-job{border-radius:10px;background:#fff;box-shadow:none;gap:12px;padding:14px 8px;border:0;border-bottom:1px solid #edf0f2}
.daily-schedule-dialog .daily-schedule-financial-summary{border-radius:12px;background:#f5f8fa;box-shadow:none;border:0}
.daily-schedule-dialog .daily-schedule-card>footer{border-top:1px solid #edf0f2;margin-top:16px;padding-top:16px;gap:8px}
.daily-schedule-dialog button,.collection-correction-dialog button{border-radius:10px;box-shadow:none;min-height:44px}
.daily-schedule-dialog .primary,.collection-correction-dialog .primary{background:#008dab;color:#fff;border-color:#008dab}
.daily-schedule-dialog .employee-schedule-history-tools{position:static;background:#fff;border:0;border-bottom:1px solid #edf0f2;box-shadow:none;border-radius:0;gap:12px}
.collection-correction-dialog{width:min(740px,calc(100vw - 32px));border-radius:20px;background:#fff}
.collection-correction-dialog .form-grid{gap:18px}
.collection-correction-dialog .field input,.collection-correction-dialog .field select,.collection-correction-dialog .field textarea{border-radius:9px;border:1px solid #d6dfe4;background:#fff;box-shadow:none;min-height:46px}
.collection-correction-dialog .required-choice{border-radius:10px;box-shadow:none;background:#f7f9fa;border:1px solid #e2e8eb;padding:12px;align-items:flex-start}
.collection-correction-dialog input[type=checkbox]{appearance:auto!important;width:18px!important;height:18px!important;min-height:0!important;border-radius:4px!important;accent-color:#008dab;flex:0 0 18px;margin-top:3px}
.collection-correction-dialog .required-choice:before,.collection-correction-dialog .required-choice:after{display:none!important}
.collection-correction-dialog .decline-warning,.collection-correction-dialog .vat-preview{border-radius:12px;background:#f4f8fa;border:1px solid #e0e8ed;box-shadow:none;padding:14px;line-height:1.65}
.historical-resolution-options{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}
.historical-resolution-options button{display:grid;gap:8px;text-align:right;padding:18px;border:1px solid #dce4e8;border-radius:12px;background:#fff;white-space:normal}
.historical-resolution-options button[aria-pressed=true]{border-color:#008dab;background:#edfafd;outline:2px solid #008dab}
@media(max-width:600px){.daily-schedule-dialog .daily-schedule-modal{padding:8px}.daily-schedule-dialog .daily-schedule-card{padding:14px}.daily-schedule-dialog .daily-schedule-job{display:grid;grid-template-columns:1fr 1fr}.daily-schedule-dialog .daily-schedule-job>div{grid-column:1/-1;grid-row:1}.collection-correction-dialog .form-grid.two,.historical-resolution-options{grid-template-columns:1fr}.collection-correction-dialog{width:calc(100vw - 16px)}}

.daily-schedule-dialog .employee-schedule-sort button{border:1px solid #dce4e8!important;border-radius:8px!important;background:#fff!important;color:#425866!important;font-size:14px!important;font-weight:500!important;min-height:36px!important;padding:7px 14px!important;box-shadow:none!important}
.daily-schedule-dialog .employee-schedule-sort button.is-active{background:#eaf7fa!important;border-color:#8ccbd7!important;color:#007e97!important}
.daily-schedule-dialog .daily-schedule-modal-head h2{font-size:22px}.daily-schedule-dialog .daily-schedule-modal-head p{font-weight:400;font-size:14px;color:#62727c}
.daily-schedule-dialog .daily-schedule-job>span{white-space:nowrap;font-size:13px;font-weight:500;color:#526571}
.daily-schedule-dialog .daily-schedule-job small{font-weight:400;font-size:12px}
/* Collection explanations must wrap inside the job button at every width. */
.daily-schedule-dialog .daily-schedule-job .daily-schedule-reported-marker{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.daily-schedule-dialog .daily-schedule-reported-marker small{white-space:normal;overflow-wrap:anywhere;max-width:min(250px,100%)}
.schedule-additional-actions{border-top:1px solid #e6ecef;margin-top:12px;padding-top:12px;color:#536672}.schedule-additional-actions summary{cursor:pointer;padding:8px;font-size:14px;font-weight:500}.schedule-additional-actions button{margin-top:12px}.schedule-additional-actions p{font-size:13px}

.collection-correction-dialog .completion-correction-context,.collection-correction-dialog .form-grid>.full{grid-column:1/-1!important;min-width:0}
.collection-correction-dialog .field{gap:7px;align-content:start}
.collection-correction-dialog .field input,.collection-correction-dialog .field select{height:46px!important;min-height:46px!important;padding:10px 12px!important;font-size:15px;font-weight:500}
.collection-correction-dialog .field textarea{min-height:96px!important;font-size:14px;font-weight:400}
.collection-correction-dialog .required-choice span{display:grid;gap:5px}
.collection-correction-dialog small,.collection-correction-dialog .decline-warning span{display:block;font-weight:400;line-height:1.6;color:#61717b}
.collection-correction-dialog .decline-warning b{color:#425761;font-weight:500}
.collection-correction-dialog .invoice-correction-fields{padding:14px;border:1px solid #e5ebee;background:#fafcfd;border-radius:12px}
.collection-correction-dialog .invoice-correction-fields h3{font-size:16px;margin:0 0 12px}
.collection-correction-dialog .completion-tax-id-toggle{font-size:14px;font-weight:500;margin-top:12px;width:auto}

.collection-correction-dialog .required-choice{display:flex!important;gap:12px}.collection-correction-dialog .required-choice>span{flex:1;min-width:0}
html[data-theme="dark"] .daily-schedule-dialog,html[data-theme="dark"] .collection-correction-dialog{background:#17232e;color:#e5edf3}
html[data-theme="dark"] .daily-schedule-dialog .daily-schedule-modal{background:#111c25}
html[data-theme="dark"] .daily-schedule-dialog .daily-schedule-card,html[data-theme="dark"] .daily-schedule-dialog .daily-schedule-job,html[data-theme="dark"] .daily-schedule-dialog .employee-schedule-history-tools,html[data-theme="dark"] .collection-correction-dialog .invoice-correction-fields,html[data-theme="dark"] .collection-correction-dialog .required-choice{background:#1d2c37;color:#e5edf3;border-color:#334653}
html[data-theme="dark"] .collection-correction-dialog .field input,html[data-theme="dark"] .collection-correction-dialog .field select,html[data-theme="dark"] .collection-correction-dialog .field textarea{background:#16222c;color:#edf4f8;border-color:#425866}
html[data-theme="dark"] .collection-correction-dialog .decline-warning,html[data-theme="dark"] .collection-correction-dialog .vat-preview,html[data-theme="dark"] .daily-schedule-dialog .daily-schedule-financial-summary{background:#233540;color:#e5edf3;border-color:#425866}
html[data-theme="dark"] .collection-correction-dialog small,html[data-theme="dark"] .collection-correction-dialog .decline-warning b,html[data-theme="dark"] .collection-correction-dialog .decline-warning span{color:#c2d1db}
