.installation-week { display:grid; grid-template-columns:repeat(7,minmax(150px,1fr)); gap:12px; overflow-x:auto; padding:12px 0; margin-bottom:24px; }
.installation-week h3 { font-size:14px; margin-bottom:12px; }
.installation-slots { display:flex; flex-wrap:wrap; gap:8px; }
.installation-slots button.button.secondary { flex:1 0 auto; padding:10px; background:var(--paper); color:var(--ink); border:1px solid var(--line); }
.installation-slots button.button.secondary:hover { background:var(--brand-soft); border-color:var(--brand); }
.installation-slots button small { display:block; font-size:11px; font-weight:400; }
.installation-slots button.button.secondary[aria-pressed=true] { background:#143554; color:white; border-color:#143554; box-shadow:0 0 0 2px var(--brand); }
.installation-slots button.button.secondary[aria-pressed=true] small { color:white; }
[data-color-scheme=dark] .installation-slots button.button.secondary[aria-pressed=true] { background:#92c2ec; color:#101c22; border-color:#92c2ec; }
[data-color-scheme=dark] .installation-slots button.button.secondary[aria-pressed=true] small { color:#101c22; }
.installation-slot-picker { max-height:38vh; overflow-y:auto; padding:8px; border:1px solid var(--line); border-radius:10px; }
.installation-slot-picker section { margin-bottom:16px; }
.installation-review { padding:16px; background:var(--brand-soft); border-radius:10px; }
.crm-dialog:has(.installation-booking) { margin:0 0 0 auto; height:100dvh; max-height:100dvh; width:min(680px,100vw); border-radius:14px 0 0 14px; }
.installation-booking fieldset { display:grid; gap:16px; }
.installation-card { display:flex; flex-direction:column; gap:8px; text-decoration:none; color:var(--ink); margin-bottom:12px; padding:16px; }
.installation-job-list { display:grid; gap:16px; }
.installation-job-list > section { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; }
.installation-status { display:inline-block; border-radius:20px; padding:6px 12px; background:var(--installation-status-bg, var(--brand-soft)); color:var(--installation-status-ink, var(--ink)); font-size:13px; font-weight:600; text-transform:capitalize; }
.installation-scheduled { --installation-status-bg:#e5effc; --installation-status-ink:#215b91; }
.installation-on_my_way { --installation-status-bg:#e1f3f8; --installation-status-ink:#12657c; }
.installation-arrived { --installation-status-bg:#f0e8fb; --installation-status-ink:#6b3894; }
.installation-in_progress, .installation-needs_assignment { --installation-status-bg:#fff0d5; --installation-status-ink:#88500d; }
.installation-done { --installation-status-bg:#e0f3e8; --installation-status-ink:#21643e; }
.installation-cancelled { --installation-status-bg:#fce8e6; --installation-status-ink:#a3322a; }
[data-color-scheme=dark] .installation-scheduled { --installation-status-bg:#203c57; --installation-status-ink:#add5ff; }
[data-color-scheme=dark] .installation-on_my_way { --installation-status-bg:#163f4a; --installation-status-ink:#a1e4f3; }
[data-color-scheme=dark] .installation-arrived { --installation-status-bg:#3d2a50; --installation-status-ink:#dfbaff; }
[data-color-scheme=dark] .installation-in_progress, [data-color-scheme=dark] .installation-needs_assignment { --installation-status-bg:#4c371d; --installation-status-ink:#ffda95; }
[data-color-scheme=dark] .installation-done { --installation-status-bg:#193f30; --installation-status-ink:#a4e8be; }
[data-color-scheme=dark] .installation-cancelled { --installation-status-bg:#4b2929; --installation-status-ink:#ffbdb7; }
.installation-photo-groups { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; margin-top:24px; }
.installation-photos { display:grid; grid-template-columns:repeat(auto-fill,minmax(100px,1fr)); gap:12px; margin:16px 0; }
.installation-photos img { width:100%; height:130px; object-fit:cover; border-radius:8px; }
.installation-photo-upload { position:relative; overflow:hidden; max-width:100%; }
.installation-photo-upload:focus-within { outline:2px solid var(--brand); outline-offset:2px; }
.installation-photo-upload .installation-photo-input { position:absolute; inset:0; width:100%; height:100%; max-width:100%; margin:0; padding:0; opacity:0; cursor:pointer; }
.installation-availability { max-width:950px; margin:auto; }
.installation-hours { display:flex; gap:16px; align-items:center; flex-wrap:wrap; padding:12px 0; border-bottom:1px solid var(--line); }
.installation-hours > label:first-child { min-width:150px; }
.installation-hours input[type=checkbox] { width:18px; height:18px; }
.installation-hours input[type=time] { width:140px; }
.installation-connect { margin-top:20px; }
@media(max-width:640px) { .installation-photo-groups { grid-template-columns:1fr; } }

.installation-filters { display:grid; grid-template-columns:180px minmax(180px,240px) minmax(240px,1fr); align-items:start; gap:20px; margin:24px 0; }
.installation-filters label { display:block; font-size:13px; font-weight:600; margin-bottom:8px; }
.installation-filters > label { display:grid; gap:8px; margin:0; }
.installation-filters input,.installation-filters select { width:100%; min-width:0; height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:var(--paper); color:var(--ink); }
.installation-customer-picker { position:relative; min-width:0; }
.installation-customer-options { position:absolute; top:100%; left:0; right:0; z-index:20; margin-top:6px; padding:6px; max-height:280px; overflow:auto; border:1px solid var(--line); border-radius:10px; background:var(--paper); box-shadow:0 10px 24px #0002; }
.installation-customer-options button { display:block; width:100%; padding:12px; text-align:left; border:0; border-radius:6px; background:transparent; color:var(--ink); }
.installation-customer-options button[aria-selected=true],.installation-customer-options button:hover { background:var(--brand-soft); }
.installation-customer-options p { margin:12px; color:var(--muted); }
.installation-section-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; padding-bottom:20px; margin-bottom:20px; border-bottom:1px solid var(--line); }
.installation-section-heading h2 { margin:0 0 6px; }
.installation-section-heading p { margin:0; font-size:14px; }
.installation-booked-panel,.installation-available-panel { margin-top:24px; padding:24px; }
.installation-booked-panel .installation-week { margin:0; padding:0; gap:0; }
.installation-day { padding:12px; min-height:180px; border-right:1px solid var(--line); }
.installation-day:last-child { border-right:0; }
.installation-day h3 { margin-top:0; }
.installation-day-empty { color:var(--muted); font-size:12px; margin:24px 0; }
.installation-empty { text-align:center; padding:36px 20px; color:var(--muted); }
.installation-empty strong { color:var(--ink); display:block; margin-bottom:8px; }
.installation-empty p { margin:0 auto; max-width:480px; }
.installation-refresh-note { border-top:1px solid var(--line); padding-top:16px; margin:20px 0 0; }
@media(max-width:760px) { .installation-filters { grid-template-columns:1fr 1fr; gap:16px; }.installation-customer-picker { grid-column:1 / -1; }.installation-section-heading { align-items:flex-start; flex-wrap:wrap; }.installation-booked-panel,.installation-available-panel { padding:18px; } }

.installation-availability fieldset { border:0; padding:0; margin:0; min-width:0; }
.installation-availability fieldset > h2 { margin:28px 0 12px; }
.installation-availability .installation-hours { min-height:76px; align-items:center; }
.installation-availability .installation-hours > label { margin:0; }
.installation-availability .installation-hours .settings-check { display:flex; flex-direction:row; align-items:center; gap:10px; margin:0; }
.installation-availability .installation-hours .settings-check input[type=checkbox] { flex:0 0 18px; width:18px; height:18px; margin:0; padding:0; }
.installation-hours-off { color:var(--muted); font-size:13px; }
.installation-availability .installation-hours label:not(.settings-check) { display:flex; flex-direction:row; align-items:center; gap:10px; }
.installation-availability .installation-hours input[type=time] { margin:0; }
@media(max-width:640px) {
  .installation-availability .installation-hours > .settings-check:first-child { flex-basis:100%; }
  .installation-availability .installation-hours { gap:12px; }
  .installation-availability .installation-hours label:not(.settings-check) { flex:1; }
  .installation-availability .installation-hours input[type=time] { min-width:0; width:100%; }
}

.service-plans { margin: 24px 0; }
.service-plans fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.service-plan-row { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.service-plans .service-plan-choice { display: flex; align-items: center; gap: 10px; margin: 0; }
.service-plans .service-plan-choice input { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; }
.service-plan-choice small { display: block; color: var(--muted); }
.service-plan-row label { min-width: 0; }
.service-plan-row select, .service-plan-row input[type=date] { width: 100%; min-width: 0; }
@media (max-width: 650px) { .service-plan-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .service-plan-choice { grid-column: 1 / -1; } }

.installation-error { padding: 12px 16px; border: 1px solid #dc7a72; border-left: 4px solid #c0392b; border-radius: 8px; background: #fff1ef; color: #922b21; overflow-wrap: anywhere; }
[data-color-scheme=dark] .installation-error { border-color: #b85b55; background: #4b2929; color: #ffd2cf; }

.installation-pending { margin-top: 28px; }
.crm-proposal-summary { min-width: 0; }
.crm-proposal-summary > button { margin-top: 12px; }

.installation-facts { display:grid; grid-template-columns:minmax(100px, 150px) minmax(0, 1fr); margin:18px 0 0; }
.installation-facts dt, .installation-facts dd { min-width:0; margin:0; padding:12px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.installation-facts dt { color:var(--muted); padding-right:16px; font-weight:500; }
.installation-facts dd a, .installation-lead-link { color:var(--brand); text-decoration:underline; text-underline-offset:3px; }
.installation-lead-link { display:inline-block; margin-top:20px; font-size:14px; }
.installation-progress { list-style:none; margin:20px 0; padding:0; display:grid; gap:8px; }
.installation-progress li { display:flex; align-items:center; gap:12px; padding:12px; border:1px solid transparent; border-radius:8px; color:var(--muted); }
.installation-progress li.is-complete { color:var(--ink); }
.installation-progress li[aria-current=step] { background:var(--installation-status-bg); color:var(--installation-status-ink); border-color:currentColor; }
.installation-step-number { flex:0 0 24px; text-align:center; font-weight:600; font-size:12px; }
.service-plan-row label:not(.service-plan-choice) { display:grid; gap:8px; font-size:13px; font-weight:600; }
.service-plan-row select, .service-plan-row input[type=date], .installation-booking input[type=date] { min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background-color:var(--paper); color:var(--ink); font:inherit; }
.service-plan-row select { padding-right:36px; }
.service-plan-row input[type=date]:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
@media(max-width:480px) { .installation-facts { grid-template-columns:100px minmax(0,1fr); } }

.service-plan-row input[type=number] { width:100%; min-width:0; min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:var(--paper); color:var(--ink); font:inherit; }

.service-plan-row:has(select[aria-label$="service method"]) { grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .service-plan-row:has(select[aria-label$="service method"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); } .service-plan-row:has(select[aria-label$="service method"]) .service-plan-choice { grid-column: 1 / -1; } }
.installation-contractor-results { margin-top: 16px; max-height: 45dvh; overflow-y: auto; }
.installation-contractor-option { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); padding: 16px 12px; background: var(--paper); color: var(--ink); }
.installation-contractor-option:hover:not(:disabled), .installation-contractor-option:focus-visible { background: var(--brand-soft); }
.installation-contractor-option > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.installation-contractor-option > span:last-child { flex-shrink: 0; }
.installation-contractor-option:disabled { opacity: .65; cursor: default; }
.installation-job-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 22px; }
.installation-job-actions h3 { display: flex; align-items: center; gap: 12px; width: 100%; font-size: 13px; color: var(--muted); margin: 0 0 2px; }
.installation-job-actions h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.installation-job-actions > button { padding: 0; background: transparent; border: 0; }
.installation-job-actions > button:hover { text-decoration: underline; }
.installation-job-actions .danger { color: var(--red); }
.installation-contractor-search { display: grid; gap: 6px; font-size: 12px; }
.installation-contractor-search input { min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; }
.installation-contractor-search input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.installation-photo-panel { margin-top:24px; }
.installation-photo-heading h2 { margin:0; }
.installation-photo-heading p { margin:6px 0 0; }
.installation-photo-columns { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; margin-top:24px; }
.installation-photo-section { min-width:0; }
.installation-photo-section + .installation-photo-section { border-left:1px solid var(--line); padding-left:24px; }
.installation-photo-section > header { display:flex; align-items:center; gap:10px; }
.installation-photo-section h3 { font-size:15px; margin:0; }
.installation-photo-section > p { margin:8px 0 16px; }
.installation-photo-count { color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.installation-photo-empty { display:flex; align-items:center; justify-content:center; gap:10px; min-height:100px; padding:16px; border:1px dashed var(--line); border-radius:10px; color:var(--muted); font-size:13px; margin:16px 0; }
.installation-photo-empty svg { flex-shrink:0; }
.installation-photo-section .installation-photo-note { font-size:12px; line-height:1.5; margin-bottom:0; }
.installation-photo-section .installation-photo-upload { font-size:13px; }
@media(max-width:900px) {
  .installation-photo-columns { grid-template-columns:1fr; gap:20px; }
  .installation-photo-section + .installation-photo-section { border-left:0; padding-left:0; border-top:1px solid var(--line); padding-top:20px; }
}
