/* Lead engine and HR screens (lead-engine-ui.js, hr-ui.js). Uses only theme variables, so every colour palette and dark mode work. Loaded after admin-pages.css. */

/* ---------- the score ---------- */
.le-score { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; padding: 3px 9px; border-radius: 999px; font-weight: 800; font-size: 12.5px; background: var(--surface-3); color: var(--muted); }
.le-score.le-hot { background: var(--green-bg); color: var(--green); }
.le-score.le-warm { background: var(--amber-bg); color: var(--amber); }
.le-score.le-cold { background: var(--surface-3); color: var(--muted); }
.le-sort { appearance: none; border: 0; background: transparent; font: inherit; font-weight: inherit; text-transform: inherit; letter-spacing: inherit; color: inherit; cursor: pointer; padding: 0; }
.le-sort:hover, .le-sort.on { color: var(--ink); text-decoration: underline; }
.le-score-td { white-space: nowrap; }
.le-scorecard { margin-bottom: 14px; }
.le-score-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.le-score-big { display: flex; align-items: baseline; gap: 8px; padding: 6px 14px; border-radius: 14px; background: var(--surface-3); }
.le-score-big b { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1; color: var(--ink); }
.le-score-big span { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.le-score-big.le-hot { background: var(--green-bg); } .le-score-big.le-hot span { color: var(--green); }
.le-score-big.le-warm { background: var(--amber-bg); } .le-score-big.le-warm span { color: var(--amber); }
.le-bar { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; margin-bottom: 12px; }
.le-bar i { display: block; height: 100%; border-radius: 8px; background: var(--muted-2); }
.le-bar i.le-hot { background: var(--green); } .le-bar i.le-warm { background: var(--amber); }
.le-reasons { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink); }
.le-reasons .le-arrow { display: inline-block; width: 16px; font-size: 10px; }
.le-r-up .le-arrow { color: var(--green); } .le-r-down .le-arrow { color: var(--red); } .le-r-neutral .le-arrow { color: var(--muted-2); }
.le-next { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--gold-wash, var(--surface-2)); border: 1px solid var(--line); }
.le-next b { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.le-next span { font-size: 14px; font-weight: 600; color: var(--ink); }

/* ---------- visit proof ---------- */
.le-visitcard { margin-bottom: 14px; }
.le-visit { padding: 10px 0; border-bottom: 1px solid var(--line-2, var(--line)); display: flex; flex-direction: column; gap: 6px; }
.le-visit:last-child { border-bottom: 0; }
.le-visit-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.le-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.le-code span { font-size: 12px; color: var(--muted); font-weight: 700; }
.le-code b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 22px; letter-spacing: .18em; color: var(--ink); }
.le-fb { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.le-visit-act { display: flex; gap: 8px; flex-wrap: wrap; }
.le-warn { color: var(--amber); }
.le-loc { padding: 9px 12px; border-radius: 10px; border: 1px dashed var(--field-line, var(--line)); font-size: 13px; margin-bottom: 8px; color: var(--muted); }
.le-loc.ok { border-style: solid; color: var(--green); background: var(--green-bg); }
.le-photo-prev img { max-width: 160px; max-height: 160px; border-radius: 12px; margin-top: 8px; border: 1px solid var(--line); }
.le-sv-extra { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- windows ---------- */
.le-box { width: min(560px, 94vw); max-height: 90vh; overflow-y: auto; }
.le-box.le-wide { width: min(860px, 96vw); }
.le-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.le-modal-head h2 { margin: 0; }
.le-modal-body .field { margin-top: 12px; }
.le-modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.le-err { margin-top: 10px; }
.le-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.le-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; margin: 2px 0; }
.le-check input { accent-color: var(--gold); width: 16px; height: 16px; }
.le-inline-check { display: inline-flex; align-items: center; gap: 6px; align-self: center; }

/* ---------- pages ---------- */
.le-tiles { grid-template-columns: repeat(auto-fit, minmax(min(165px, 100%), 1fr)); }
.le-tiles .le-num { font-size: 36px; }
#le-rules-body > *, #le-cost-body > *, #le-hr-body > *, #le-sv-extra > * { margin-bottom: 18px; }
.le-weights .ap-inline input[type="range"] { width: min(320px, 60vw); accent-color: var(--gold); }
.le-weights output { min-width: 2.2em; font-weight: 800; color: var(--ink); }
.le-filters, .le-filters-in { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.le-filters input, .le-filters select, .le-filters-in input, .le-select, .le-portal-form input, .le-portal-form select, .le-amt, .le-note, .le-sec input[type="text"], .le-sec input[type="number"], .le-sec input[type="date"], .le-sec select {
  padding: 7px 10px; border-radius: 10px; border: 1px solid var(--field-line, var(--line)); background: var(--surface); color: var(--ink); font: inherit; }
.le-amt { width: 130px; } .le-note { width: 100%; min-width: 140px; }
.le-portal-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.le-portal-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.le-portal-form .le-checks { align-self: center; }
.le-cost-table .le-sub-row td { background: var(--surface-2); }
.le-cost-table .le-total-row td { border-top: 2px solid var(--line); background: var(--surface-2); }
.le-cost-table td:nth-child(2) { white-space: nowrap; }
.le-hr-tabs { padding: 0; background: transparent; }
.le-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin: 16px 0; }
@media (max-width: 760px) { .le-two { grid-template-columns: minmax(0, 1fr); } }
.le-sec { margin-top: 16px; } .le-sec h3 { margin: 0 0 8px; font-size: 15px; }
.le-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.le-bal .ap-num { font-size: 30px; }

/* ---------- backup strip ---------- */
.le-strip { display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; padding: 10px 30px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 13px; }
.le-strip-main { display: flex; flex-direction: column; gap: 1px; flex: 1 1 300px; min-width: 0; }
.le-strip-main b { color: var(--ink); font-size: 13.5px; }
.le-strip-keep { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.le-strip-keep input { width: 70px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--field-line, var(--line)); background: var(--surface); color: var(--ink); font: inherit; }
.le-strip + .main.proto-main .proto-frame { min-height: calc(100vh - 118px - var(--strip-h, 0px)); }
@media (max-width: 880px) { .le-strip { padding: 10px 14px; } .le-strip + .main.proto-main .proto-frame { min-height: calc(100vh - 118px - 62px - var(--strip-h, 0px)); } }
/* The Hourly copies control on Backup & Recovery (Update 72): a card inside the page, lined up with the page's own cards,
   not a grey strip squeezed under the top buttons where it read as part of the top bar. */
#le-bk-strip.le-strip { margin: 22px 34px 2px; padding: 14px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 1px 2px rgba(20, 20, 30, .04); }
#le-bk-strip .le-strip-main b { font-size: 15px; }
#le-bk-strip + .main.proto-main .proto-frame { min-height: calc(100vh - 160px - var(--strip-h, 0px)); }
@media (max-width: 880px) { #le-bk-strip.le-strip { margin: 14px 14px 2px; padding: 12px 14px; } }

.le-btn-link { margin-left: 8px; }

/* the two older Visit ID choices only matter when "Hide the Visit ID from employees" is off */
.svr-legacy { border-left: 2px solid var(--line, #E6E4DE); padding-left: 12px; margin: 4px 0 6px 4px; }
.svr-legacy.svr-off::before { content: 'Only used when the switch above is off.'; display: block; font-size: 12px; color: var(--muted, #5C5E66); margin-bottom: 4px; }
