
#page-settings .la-unset{display:inline-block;font-size:10px;font-weight:800;letter-spacing:.4px;text-transform:uppercase;padding:2px 8px;border-radius:999px;background:rgba(224,107,91,.16);color:#e06b5b;border:1px solid rgba(224,107,91,.45);margin-left:8px;vertical-align:1px}
#page-settings .la-set{display:inline-block;font-size:10px;font-weight:800;letter-spacing:.4px;text-transform:uppercase;padding:2px 8px;border-radius:999px;background:rgba(63,167,116,.14);color:#5fc48f;border:1px solid rgba(63,167,116,.4);margin-left:8px;vertical-align:1px}
#page-settings .la-banner{border-radius:12px;padding:13px 15px;font-size:13px;line-height:1.55;margin:0 0 4px}
#page-settings .la-banner.off{background:rgba(224,107,91,.08);border:1px solid rgba(224,107,91,.5);color:var(--text)}
#page-settings .la-banner.on{background:rgba(63,167,116,.07);border:1px solid rgba(63,167,116,.45);color:var(--text)}
#page-settings .la-banner b{font-weight:800}
#page-settings .la-err{display:none;background:rgba(224,107,91,.1);border:1px solid rgba(224,107,91,.55);border-radius:10px;color:#e8907f;font-size:12.5px;line-height:1.5;padding:10px 12px;margin-top:10px;white-space:pre-wrap}
#page-settings .la-saved{display:none;color:#5fc48f;font-size:12.5px;font-weight:700;margin-left:10px}
#page-settings .la-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px 16px;margin-top:6px}
/* Sectioned rows: each section's fields share ONE row of equal columns, so every row ends
   flush — no ragged auto-fill packing (Ryan, 2026-08-19: "even endings on everything"). */
#page-settings .la-row{display:grid;gap:12px 16px;margin-top:8px;align-items:start}
#page-settings .la-row.c4{grid-template-columns:repeat(4,minmax(0,1fr))}
#page-settings .la-row.c3{grid-template-columns:repeat(3,minmax(0,1fr))}
#page-settings .la-row.c2{grid-template-columns:repeat(2,minmax(0,1fr))}
/* Two wide fields + one narrow stack (service area); one wide + one note (never-decline).
   These MUST be classes, not inline styles — an inline grid-template-columns outranks the
   phone media query below and used to leave 94px columns on a 390px screen. */
#page-settings .la-row.c21{grid-template-columns:repeat(2,minmax(0,1fr)) minmax(0,1fr)}
#page-settings .la-row.c2w{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
/* The mirror of c2w: one NARROW field beside a wide note (the same-area radius — a two-digit
   number does not want 2fr, and the "this never declines anyone" note does). */
#page-settings .la-row.w2c{grid-template-columns:minmax(0,1fr) minmax(0,2fr)}
@media(max-width:1100px){#page-settings .la-row.c4,#page-settings .la-row.c3,#page-settings .la-row.c21{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){#page-settings .la-row.c4,#page-settings .la-row.c3,#page-settings .la-row.c2,#page-settings .la-row.c21,#page-settings .la-row.c2w,#page-settings .la-row.w2c{grid-template-columns:minmax(0,1fr)}}
#page-settings .la-dh{margin-top:8px;max-width:560px}
#page-settings .la-dh-row{display:flex;align-items:center;gap:10px;padding:7px 0;border-top:1px solid var(--border)}
#page-settings .la-dh-row:first-child{border-top:0}
#page-settings .la-dh-day{flex:0 0 92px;font-size:13px;font-weight:700;color:var(--text)}
#page-settings .la-dh-row input[type=time]{width:118px;height:36px}
#page-settings .la-dh-to{font-size:12px;color:var(--text3)}
#page-settings .la-dh-state{font-size:11px;font-weight:800;letter-spacing:.3px;text-transform:uppercase;color:var(--text3);min-width:46px;text-align:right;margin-left:auto}
#page-settings .la-dh-closed .la-dh-day{color:var(--text3)}
#page-settings .la-dh-closed input[type=time]{opacity:.35}
/* Phone: the day row is 400px of content in a 316px card, so the Open/Closed switch and its
   label used to run off the right edge (clipped, not scrollable — Ryan could not see whether
   a day was on). Wrap it: day + switch + state on line one, the hours beneath. */
@media(max-width:560px){
  #page-settings .la-dh-row{flex-wrap:wrap;row-gap:6px;padding:9px 0}
  #page-settings .la-dh-day{order:1;flex:0 1 auto}
  #page-settings .la-dh-row .set-switch{order:2}
  #page-settings .la-dh-state{order:3;margin-left:auto}
  #page-settings .la-dh-row::after{content:'';order:4;flex:0 0 100%;height:0}
  #page-settings .la-dh-row input[type=time],#page-settings .la-dh-to{order:5}
  #page-settings .la-dh-row input[type=time]{flex:1 1 0;min-width:0;width:auto}
}
#page-settings .la-sec{margin:18px 0 0;padding-top:14px;border-top:1px solid var(--border)}
#page-settings .la-sec:first-of-type{margin-top:10px;padding-top:0;border-top:0}
#page-settings .la-sec-t{font-size:12px;font-weight:800;letter-spacing:.4px;text-transform:uppercase;color:var(--text3)}
#page-settings .la-sec-s{font-size:12px;color:var(--text3);line-height:1.45;margin-top:3px}
/* Every field is LABEL / CONTROL / HELP in that order, every cell starts at the top of its
   row, and every label line is the same height — so labels line up across a row, the inputs
   and dropdowns line up under them, and help text sits underneath (Ryan, 2026-08-19: "line
   up the bubbles... put the text below"). The SET badge rides ON the label line rather than
   taking a line of its own; that mismatch is what used to push some inputs a row lower than
   their neighbours. normalizeFields() in the module guarantees the three-part shape. */
#page-settings .la-f{display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--text2);font-weight:600;min-width:0}
#page-settings .la-lab{display:flex;align-items:center;gap:8px;flex-wrap:wrap;line-height:1.35;min-height:20px}
#page-settings .la-lab:empty{display:none}
#page-settings .la-checkbtn{height:38px;align-self:start}
/* Two short fields stacked beside the tall city boxes — same top-aligned stack, so the first
   of them lines up with the boxes and the second flows underneath. */
#page-settings .la-substack{display:flex;flex-direction:column;gap:14px;min-width:0;align-self:start}
#page-settings .la-f input,#page-settings .la-f select,#page-settings .la-f textarea{background:var(--bg2);border:1px solid var(--border);border-radius:8px;color:var(--text);font-size:13.5px;padding:8px 10px;outline:none;font-family:inherit;width:100%;box-sizing:border-box}
#page-settings .la-f input,#page-settings .la-f select{height:38px}
#page-settings .la-f > *{min-width:0}
/* The one save bar rides the bottom of the viewport (.set-savebar, the app's own pattern)
   and is only ever visible while something on the Lead agent tab is unsaved. */
#page-settings #la-savebar .msg-dirty .ic{color:#e0a23b}
/* A refused save has to be readable WHERE THE CLICK WAS. The per-card error box is often
   scrolled far off-screen, so a failure used to look exactly like a dead button. */
#page-settings #la-savebar .msg-failed{display:none;color:#e8907f;font-weight:600;max-width:min(70ch,60vw)}
#page-settings #la-savebar.failed .msg-dirty{display:none}
#page-settings #la-savebar.failed .msg-failed{display:inline-flex}
#page-settings #la-savebar.failed{border-color:rgba(224,107,91,.6)}
#page-settings .la-f input:focus,#page-settings .la-f textarea:focus{border-color:var(--blue)}
#page-settings .la-f textarea{min-height:72px;resize:vertical;line-height:1.5}
#page-settings .la-f textarea.la-cities{min-height:190px}
#page-settings .la-f .la-hint{font-size:11px;color:var(--text3);font-weight:400;line-height:1.4}
#page-settings .la-lab > .la-unset,#page-settings .la-lab > .la-set{margin-left:0}
#page-settings .la-actions{display:flex;align-items:center;gap:8px;margin-top:14px}
#page-settings .la-bo-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid var(--border);font-size:13px;flex-wrap:wrap}
#page-settings .la-bo-row b{color:var(--text)}
#page-settings .la-bo-when{color:var(--text2);font-size:12.5px;flex:1;min-width:160px}
#page-settings .la-bo-off{opacity:.5}
#page-settings .la-bo-editing{border-left:3px solid var(--blue-m);padding-left:8px}
#page-settings .la-bo-add{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin-top:12px;align-items:end}
#page-settings .la-ro{font-size:12.5px;color:var(--text3)}
