/* Status uses surfaces; saved employee and object colors use dots only. */
body:has(.calendar-title) .wrap{max-width:1800px}
body:has(.calendar-title) #view{padding:24px}
.calendar-scroll{overflow:auto}.weekgrid{min-width:1300px;grid-template-columns:repeat(7,minmax(180px,1fr));gap:12px}.daycol{padding:10px;min-height:400px}.dayhead{position:sticky;top:0;background:#f8fbfb;padding:8px 0;z-index:1}
.calendar-card,.calendar-legend,.event.absence{--status:#2563a8;--surface:#e9f2ff;--ink:#153e72}
.calendar-card.state-planned,.state-planned,.calendar-legend.planned{--status:#2563a8;--surface:#e9f2ff;--ink:#153e72}
.calendar-card.state-done,.state-done,.calendar-legend.done{--status:#16803a;--surface:#e7f6eb;--ink:#125b2d}
.calendar-card.state-running,.state-running,.calendar-legend.running{--status:#16803a;--surface:#f0fcf3;--ink:#125b2d}
.calendar-card.state-vacation,.state-vacation,.calendar-legend.vacation{--status:#b58a00;--surface:#fff5c2;--ink:#634b00}
.calendar-card.state-sick,.state-sick,.calendar-legend.sick{--status:#c62c32;--surface:#ffebed;--ink:#8f1c21}
.calendar-card.state-cancelled,.state-cancelled,.calendar-legend.cancelled{--status:#66717e;--surface:#edf0f3;--ink:#39434d}
.calendar-card.state-moved,.state-moved,.calendar-legend.moved{--status:#e07813;--surface:#fff0dd;--ink:#8b4100}
.calendar-card.state-special,.state-special,.calendar-legend.special{--status:#8148b0;--surface:#f3eafd;--ink:#603080}
.calendar-card.state-attention,.state-attention,.calendar-legend.attention{--status:#963b08;--surface:#ffdfc2;--ink:#743007}
.calendar-card{border:1px solid var(--status);border-left:4px solid var(--status);background:var(--surface);color:#142128;box-shadow:none}
.calendar-card summary{background:transparent;font-size:14px;line-height:1.5;padding:12px 24px 12px 10px}
.calendar-state{background:var(--surface);color:var(--ink);border:1px solid var(--status);font-size:14px;white-space:normal}
.calendar-legend,.event.absence{background:var(--surface);color:var(--ink);border:1px solid var(--status);font-size:14px}
.calendar-time{display:block;font-size:16px;font-weight:800;white-space:normal}.calendar-card-head{display:flex;align-items:flex-start;flex-direction:column;gap:6px}.calendar-plan-time,.calendar-client{display:block;font-size:14px;color:#344550;margin-top:5px}.calendar-employee,.calendar-customer{display:block;margin-top:6px;font-size:14px;overflow-wrap:anywhere}.employee-dot,.customer-dot{display:inline-block;width:12px;height:12px;min-width:12px;margin-right:6px;border:1px solid #14212855;vertical-align:middle;border-radius:50%}.employee-dot{background:var(--employee)}.customer-dot{background:var(--customer);border-radius:3px}
.calendar-card-details{background:#ffffffb8;padding:12px}.calendar-title h2{margin-bottom:6px}.calendar-status-legend{gap:8px;display:flex;flex-wrap:wrap;margin:18px 0}.calendar-legend{padding:6px 10px;border-radius:6px}.calendar-state{padding:3px 7px;border-radius:5px}.calendar-filter{margin:16px 0}.calendar-actions{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.calendar-dialog{width:min(680px,calc(100% - 24px));max-height:90vh;overflow:auto;border:1px solid #cbd8dc;border-radius:16px;padding:24px}.calendar-dialog::backdrop{background:#102b3870}.calendar-dialog footer{display:flex;gap:10px;justify-content:flex-end}.calendar-dialog label input[type=checkbox]{width:auto}.calendar-dialog .grid{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.data-table{width:100%;border-collapse:collapse}.data-table th,.data-table td{padding:12px;text-align:left;border-bottom:1px solid #dae4e7;vertical-align:top}.data-table th{background:#eef5f4}.table-scroll{overflow:auto}.data-table button{margin:0}.data-value{font-size:22px;font-weight:800}.review-note{padding:12px;background:#ffdfc2;border:1px solid #963b08;color:#743007;border-radius:8px}
@media(max-width:700px){body:has(.calendar-title) #view{padding:14px}.weekgrid{min-width:0;grid-template-columns:1fr}.daycol{min-height:0}.dayhead{position:static}.calendar-scroll{overflow:visible}.calendar-card summary{padding:12px 30px 12px 12px}.calendar-card-head{flex-direction:row;flex-wrap:wrap;justify-content:space-between}.calendar-controls label{min-width:140px;flex:1}.calendar-dialog{padding:16px}.calendar-dialog .grid{grid-template-columns:1fr}}

.calendar-status-legend .calendar-legend{background:var(--surface);color:var(--ink)}
.employee-chip.active .employee-dot{background:var(--employee)}.customer-chip.active .customer-dot{background:var(--customer)}

.employee-chip.active,.customer-chip.active{background:#123c4a;color:#fff;border-color:#123c4a}.employee-chip,.customer-chip{font-size:14px}

#documentForm input[type="checkbox"]{width:auto;margin-right:8px}#documentPhotoList button{padding:6px 10px;margin:4px 0 4px 8px;font-size:14px}
.document-library-filters{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));align-items:end}.document-library-row{gap:10px}.document-open-main{flex:1;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;text-align:left;background:#f7fbfa;color:#0a3037;border:1px solid #cddfdb;padding:14px}.document-open-main:hover{background:#eaf5f1;border-color:#0b8a67}.document-pdf-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:8px;background:#06584e;color:#fff;font-size:12px;font-weight:800;letter-spacing:.06em}.document-library-row>.secondary{white-space:nowrap}@media(max-width:700px){.document-library-row{display:block}.document-library-row>.secondary{width:100%;margin-top:8px}.document-open-main{width:100%}}
.my-time-table td:first-child,.my-time-table td:nth-last-child(-n+3){white-space:nowrap}@media(max-width:700px){.my-time-table{min-width:760px}}

.occurrence-dialog{width:min(1040px,calc(100% - 32px));max-height:92vh}.occurrence-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}.occurrence-tabs [aria-selected=false]{background:#e8efec;color:#153c2e}.occurrence-dialog fieldset{border:0;padding:0;margin:0}.occurrence-dialog [hidden]{display:none}.occurrence-dialog textarea{min-height:70px}.occurrence-dialog input[type=checkbox]{width:auto}.feasibility{padding:14px;border:2px solid;border-radius:8px;margin:14px 0}.feasibility.green{background:#e2f5e8;color:#19592e;border-color:#328747}.feasibility.yellow{background:#fff3cb;color:#715200;border-color:#b18b16}.feasibility.red{background:#ffe5e5;color:#8f2020;border-color:#bd3333}.history-changes{white-space:pre-wrap;overflow-wrap:anywhere;max-width:600px;max-height:360px;overflow:auto}@media(max-width:700px){.occurrence-dialog{width:calc(100% - 12px);padding:14px}.occurrence-tabs button{flex:1;min-width:135px}}
.calendar-card-button{display:block;width:100%;text-align:left;font:inherit;color:inherit;cursor:pointer;padding:12px 10px;margin:0 0 8px;border-radius:8px}
.calendar-card-button:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(20,33,40,.12)}
.calendar-card-button .calendar-card-head,.calendar-card-button .calendar-plan-time,.calendar-card-button .calendar-client,.calendar-card-button .calendar-customer,.calendar-card-button .calendar-employee{pointer-events:none}
.simple-occurrence-dialog{width:min(720px,calc(100% - 24px))}
.simple-occurrence-dialog form{display:grid;gap:1rem}
