/* Quick Estimate (quickEstimate.js), shared by the office program and the employee app.
   Uses only the color variables both apps define. */
.qe { max-width: 860px; color: var(--text); }
.qe-head h2 { margin: 0 0 6px; }
.qe-muted { color: var(--muted); font-size: 13px; margin: 4px 0 10px; line-height: 1.45; }
.qe-empty { padding: 28px; text-align: center; color: var(--muted); }
.qe-alert { padding: 11px 13px; border-radius: 10px; margin: 10px 0; font-size: 13px; background: color-mix(in srgb, var(--danger) 14%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.qe-warn { padding: 9px 12px; border-radius: 10px; margin: 8px 0; font-size: 13px; background: color-mix(in srgb, var(--warn) 16%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.qe-btn { padding: 12px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; border: 1px solid var(--line); cursor: pointer; }
.qe-btn:disabled { opacity: .55; cursor: wait; }
.qe-primary { background: var(--accent); color: var(--accent-ink, #111); border-color: var(--accent); }
.qe-ghost { background: var(--surface); color: var(--text); }
.qe-wide { width: 100%; margin: 8px 0; }
.qe-link { background: none; border: 0; color: var(--accent); font-weight: 700; padding: 6px 0; cursor: pointer; font-size: 14px; }
.qe-danger { color: var(--danger); margin-top: 8px; }
.qe-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.qe-list { margin: 10px 0 14px; }
.qe-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; margin-bottom: 8px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer; font-weight: 400; }
.qe-row small, .qe-line small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.qe-row-end { text-align: right; flex: none; }
.qe-status { font-weight: 700; }
.qe-status.ready { color: var(--warn); } .qe-status.sent { color: var(--good); } .qe-status.analyzing { color: var(--accent); }
.qe-status.requested { color: var(--danger); } .qe-status.declined { color: var(--muted); }
.qe-requests { padding: 12px 14px 4px; margin: 10px 0 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 7%, transparent); }
.qe-requests h3 { margin: 0 0 4px; font-size: 15px; }
.qe-request { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.qe-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.qe-top .qe-status { font-size: 13px; }
.qe-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.qe-card h3 { margin: 0 0 8px; font-size: 15px; }
.qe-card p { margin: 4px 0 8px; line-height: 1.45; }
.qe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.qe-field { display: block; margin: 0 0 10px; }
.qe-field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0 0 5px 2px; }
.qe-input { width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 15px; font-family: inherit; }
textarea.qe-input { resize: vertical; }
.qe-vin { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: end; }
.qe-vin .qe-btn { margin-bottom: 10px; padding: 11px 12px; }
.qe-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 4px; }
.qe-photo { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.qe-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qe-photo i { position: absolute; left: 5px; bottom: 5px; font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: rgba(0,0,0,.65); color: #fff; }
.qe-photo button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; }
.qe-working { display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; }
.qe-spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: qe-spin 0.9s linear infinite; }
@keyframes qe-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .qe-spin { animation: none; } }
.qe-prompt { border-color: var(--warn); }
.qe-qs { margin: 6px 0 0 18px; padding: 0; font-size: 13px; color: var(--muted); }
.qe-lines { margin: 4px 0 8px; }
.qe-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 8px 0 6px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.qe-seg button { padding: 10px 8px; border: 0; background: var(--surface); color: var(--text); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.qe-seg button + button { border-left: 1px solid var(--line); }
.qe-seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink, #111); }
.qe-seg-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; margin: 8px 0 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.qe-seg-row .qe-seg { margin: 0; }
.qe-totals .qe-link { padding: 0; font-size: 14px; }
.qe-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding: 9px 0; }
.qe-line.off { opacity: .5; }
.qe-line-main { background: none; border: 0; padding: 0; text-align: left; color: var(--text); cursor: pointer; font-weight: 400; font-size: 14px; }
.qe-line-main em { color: var(--warn); font-style: normal; font-weight: 700; }
.qe-note { font-style: italic; }
.qe-amt { font-weight: 700; white-space: nowrap; font-size: 14px; }
.qe-totals { border-top: 2px solid var(--line); margin-top: 6px; padding-top: 8px; }
.qe-totals > div:not(.qe-warn) { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 14px; }
.qe-totals span { color: var(--muted); }
.qe-total { font-size: 17px !important; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px !important; }
.qe-total span { color: var(--text) !important; font-weight: 700; }
.qe-sheet { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.qe-sheet-card { width: min(560px, 100%); max-height: 88vh; overflow: auto; box-sizing: border-box; background: var(--surface); color: var(--text); border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .qe-sheet { align-items: center; } .qe-sheet-card { border-radius: 18px; } }
.qe-sheet-card h3 { margin: 0 0 12px; }
.qe-check { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 14px; }
.qe-ops { max-height: 50vh; overflow: auto; margin-top: 10px; }
.qe-op { display: block; width: 100%; text-align: left; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); cursor: pointer; font-weight: 400; }
.qe-op small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
@media (max-width: 520px) { .qe-seg-row { grid-template-columns: 1fr; gap: 5px; } .qe-vin { grid-template-columns: 1fr 1fr; } .qe-vin .qe-field { grid-column: 1 / -1; } }

/* Website Bookings (client/bookings.js) reuses the Quick Estimate look. */
.wb-card.wb-new { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.wb-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.wb-top .qe-status { margin-left: auto; }
.wb-kind { font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.wb-kind.dropoff { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.wb-shop { font-weight: 700; color: var(--muted); }
.wb-who { margin: 2px 0; }
.wb-who a { color: inherit; }
.wb-notes { margin: 6px 0; white-space: pre-wrap; }
.wb-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wb-panel { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.wb-panel .qe-muted { flex-basis: 100%; margin: 0; }
.wb-h { margin: 18px 0 8px; font-size: 15px; }
.wb-past { margin-top: 16px; }
.wb-past summary { cursor: pointer; font-weight: 700; margin-bottom: 10px; }
