/* =============================================================================
   admin.css: owner console for Randoms Lawn Care & Hardscaping.
   Hand-written static file (admin agent). Tokens = SPEC §3 "Craft Green".
   Fonts: same self-hosted woff2 as the site (url()s relative to assets/css/).
   ============================================================================= */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/bricolage-grotesque-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/bricolage-grotesque-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Fallback"; src: local("Arial"), local("ArialMT"), local("Arimo"), local("Liberation Sans");
  font-weight: 200 500; size-adjust: 106.13%; ascent-override: 87.63%; descent-override: 25.44%; line-gap-override: 0%; }
@font-face { font-family: "Bricolage Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Arimo Bold"), local("Liberation Sans Bold");
  font-weight: 600 800; size-adjust: 99.65%; ascent-override: 93.33%; descent-override: 27.09%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("ArialMT"), local("Arimo"), local("Liberation Sans");
  font-weight: 100 500; size-adjust: 107.34%; ascent-override: 90.25%; descent-override: 22.47%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Arimo Bold"), local("Liberation Sans Bold");
  font-weight: 600 900; size-adjust: 102%; ascent-override: 94.98%; descent-override: 23.65%; line-gap-override: 0%; }

:root {
  --green-950: #0b2314; --green-900: #0f2e1a; --green-800: #163f24; --green-700: #1f5a31;
  --green-500: #3a8f4a; --green-400: #58a85f; --green-100: #e3f1e4; --lime: #a8d94a;
  --sand-50: #faf8f2; --sand-100: #f6f2e8; --sand-200: #ece4d3; --tan: #c8a45d; --tan-600: #a9853f;
  --terracotta: #b8613a; --ink: #14181a; --slate: #4a5550; --mist: #e4e9e5; --white: #fff; --star: #f5b301;
  --r-leaf: 22px 6px 22px 6px; --r-leaf-sm: 14px 5px 14px 5px; --r-card: 18px; --r-pill: 999px; --r-input: 10px;
  --shadow-card: 0 1px 2px rgba(15, 46, 26, .05), 0 10px 30px rgba(15, 46, 26, .07);
  --shadow-pop: 0 18px 50px rgba(11, 35, 20, .24);
  --ring: 0 0 0 3px rgba(58, 143, 74, .45);
  --font-display: "Bricolage Grotesque", "Bricolage Fallback", system-ui, sans-serif;
  --font-body: "Inter", "Inter Fallback", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
  /* admin-only semantic tokens (all ≥ 4.5:1 on their backgrounds) */
  --line: #d6ded9; --line-strong: #8a978f;
  --danger: #a3261b; --danger-bg: #fbeceb; --danger-line: #efc9c5;
  --warn: #7a4f00; --warn-bg: #fdf3dc; --warn-line: #f0dca8;
  --ok-bg: #e3f1e4; --info-bg: #eef5ef; --info-line: #cfe3d2;
  --en: #163f24; --en-bg: #e3f1e4; --es: #8a3f1f; --es-bg: #f8e6dc;
  --side-w: 268px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 140px; }
body { margin: 0; font: 15px/1.55 var(--font-body); color: var(--ink); background: var(--sand-100); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--green-700); text-underline-offset: 2px; }
a:hover { color: var(--green-900); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(58, 143, 74, .6); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -64px; z-index: 100; background: var(--white); color: var(--green-900); padding: 10px 16px; border-radius: var(--r-leaf-sm); font-weight: 600; box-shadow: var(--shadow-card); transition: top .2s var(--ease); }
.skip:focus { top: 12px; }
.ic { display: inline-flex; width: 20px; height: 20px; flex: none; }
.ic svg { width: 100%; height: 100%; display: block; }
code, .mono { font-family: var(--font-mono); font-size: .86em; }
code { background: var(--sand-100); border: 1px solid var(--sand-200); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.muted { color: var(--slate); }
.nowrap { white-space: nowrap; }

/* ---------- boot / no-JS ---------- */
.boot-msg { display: none; }
.is-booting .login, .is-booting .app { visibility: hidden; }
.is-booting .boot-msg { display: block; position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; padding: 14px 18px;
  background: var(--white); border-radius: 12px; box-shadow: var(--shadow-card); font-size: 14px; color: var(--slate); opacity: 0; animation: boot-show .01s 4s forwards; }
.boot-msg.boot-msg--now { display: block; position: static; opacity: 1; animation: none; max-width: 560px; margin: 24px auto; }
@keyframes boot-show { to { opacity: 1; } }

/* ---------- login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 32px 16px;
  background:
    radial-gradient(1100px 560px at 88% -12%, rgba(168, 217, 74, .16), transparent 60%),
    radial-gradient(900px 520px at -12% 112%, rgba(200, 164, 93, .20), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 60px),
    var(--green-950); }
.login__card { width: 100%; max-width: 430px; background: var(--white); border-radius: 30px 10px 30px 10px; padding: 34px 32px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .38); }
.login__logo { width: 76px; height: 76px; margin: 0 0 18px; }
.login__eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--green-700); display: flex; align-items: center; gap: 10px; }
.login__eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; flex: none; }
.login__title { font-size: 34px; font-weight: 800; margin: 8px 0 6px; color: var(--green-900); }
.login__sub { color: var(--slate); margin-bottom: 22px; }
.login__form { display: grid; gap: 16px; }
.login__error { font-size: 14px; color: var(--danger); font-weight: 500; display: flex; gap: 8px; align-items: flex-start; }
.login__error:empty { display: none; }
.login__error.is-cooldown { color: var(--warn); }
.login__note { display: flex; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--mist); font-size: 13px; color: var(--slate); }
.login__note .ic { width: 18px; height: 18px; color: var(--green-500); margin-top: 1px; }
.login__foot { color: rgba(255, 255, 255, .72); font-size: 13px; }
.pass { position: relative; }
.pass .input { padding-right: 52px; }
.pass__toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 40px; border: 0; background: transparent; color: var(--slate); border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pass__toggle:hover { color: var(--green-800); }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; color: var(--white); padding: 20px 14px; overflow-y: auto;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 30px), linear-gradient(180deg, var(--green-900), var(--green-950)); }
.side :focus-visible { outline-color: var(--lime); }
.side__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 18px; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: 14px; }
.side__brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; border-radius: 12px; min-width: 0; }
.side__brand:hover { color: inherit; }
.side__logo { width: 44px; height: 44px; background: var(--white); border-radius: 50%; padding: 3px; flex: none; }
.side__names { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.side__name { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -.01em; }
.side__sub { font-size: 11.5px; color: rgba(255, 255, 255, .74); letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.side__quick { display: none; }
.tabs { display: flex; flex-direction: column; gap: 3px; }
.tab { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; background: transparent; color: rgba(255, 255, 255, .84);
  border-radius: 12px 4px 12px 4px; font-weight: 500; font-size: 15px; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.tab:hover { background: rgba(255, 255, 255, .07); color: var(--white); }
.tab[aria-selected="true"] { background: rgba(255, 255, 255, .13); color: var(--white); font-weight: 600; }
.tab[aria-selected="true"]::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--lime); }
.tab .ic { opacity: .9; }
.tab[aria-selected="true"] .ic { color: var(--lime); opacity: 1; }
.tab__label { flex: 1; }
.tab__count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: var(--r-pill); background: var(--lime); color: var(--green-950); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tab__dirty { display: none; width: 9px; height: 9px; border-radius: 50%; background: var(--tan); flex: none; }
.tab.is-dirty .tab__dirty { display: inline-block; }
.side__foot { margin-top: auto; display: grid; gap: 2px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); }
.side__link { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 8px 12px; border: 0; background: transparent; color: rgba(255, 255, 255, .84); text-decoration: none;
  font-size: 14px; border-radius: 12px 4px 12px 4px; cursor: pointer; text-align: left; width: 100%; }
.side__link:hover { background: rgba(255, 255, 255, .07); color: var(--white); }
.side__link .ic { width: 18px; height: 18px; }
.main { min-width: 0; padding: 30px clamp(16px, 3vw, 40px) 0; outline: none; }
.pane { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100vh - 30px); }
.pane__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.pane__title { font-size: clamp(26px, 3vw, 34px); font-weight: 800; color: var(--green-900); }
.pane__desc { color: var(--slate); margin-top: 6px; max-width: 64ch; }
.pane__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pane__actions:empty { display: none; }
.pane__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-bottom: 28px; flex: 1; align-content: start; min-width: 0; }

/* ---------- sticky save bar ---------- */
.savebar { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px;
  padding: 12px 14px 12px 18px; background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border: 1px solid var(--line); border-radius: 18px 6px 18px 6px; box-shadow: 0 10px 30px rgba(15, 46, 26, .12); }
.savebar__status { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--slate); font-weight: 500; }
.savebar__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green-400); flex: none; }
.savebar.is-dirty { border-color: #e2cf9f; }
.savebar.is-dirty .savebar__dot { background: var(--tan); box-shadow: 0 0 0 4px rgba(200, 164, 93, .25); }
.savebar.is-dirty .savebar__status { color: var(--ink); }
.savebar__actions { display: flex; gap: 10px; }
/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1.5px solid transparent; border-radius: var(--r-leaf-sm);
  font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.1; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s var(--ease), background .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .ic { width: 18px; height: 18px; }
.btn--primary { background: var(--green-700); color: var(--white); }
.btn--primary:hover:not(:disabled) { background: var(--green-800); color: var(--white); box-shadow: 0 6px 16px rgba(31, 90, 49, .25); }
.btn--gold { background: var(--tan); color: var(--ink); }
.btn--gold:hover:not(:disabled) { background: #bb9750; color: var(--ink); }
.btn--ghost { background: var(--white); color: var(--green-800); border-color: var(--line); }
.btn--ghost:hover:not(:disabled) { border-color: var(--green-500); color: var(--green-900); }
.btn--danger { background: var(--white); color: var(--danger); border-color: var(--danger-line); }
.btn--danger:hover:not(:disabled) { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn--lg { min-height: 52px; font-size: 16px; }
.btn--block { width: 100%; }
.btn.is-busy { cursor: progress; opacity: 1; }
.btn.is-busy .ic { display: none; }
.spin { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1.5px solid var(--line); background: var(--white); color: var(--green-800);
  border-radius: 12px 4px 12px 4px; cursor: pointer; flex: none; transition: border-color .15s, background .15s, color .15s; text-decoration: none; }
.iconbtn:hover:not(:disabled) { border-color: var(--green-500); color: var(--green-900); }
.iconbtn:disabled { opacity: .35; cursor: not-allowed; }
.iconbtn .ic { width: 18px; height: 18px; }
.iconbtn--dark { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: var(--white); }
.iconbtn--dark:hover:not(:disabled) { border-color: var(--lime); color: var(--white); }
.iconbtn--danger { color: var(--danger); }
.iconbtn--danger:hover:not(:disabled) { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }

/* ---------- cards, tiles, callouts ---------- */
.card { background: var(--white); border: 1px solid var(--mist); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: clamp(18px, 2.4vw, 26px); min-width: 0; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.card__title { font-size: 19px; font-weight: 700; color: var(--green-900); display: flex; align-items: center; gap: 10px; }
.card__title .ic { color: var(--green-500); }
.card__desc { color: var(--slate); font-size: 14px; margin-top: 4px; max-width: 72ch; }
.card__foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--mist); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 16px; }
.tile { background: var(--white); border: 1px solid var(--mist); border-radius: var(--r-card); padding: 18px 20px; box-shadow: var(--shadow-card); display: grid; gap: 6px; align-content: start; }
.tile__label { font-size: 13px; color: var(--slate); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.tile__label .ic { width: 18px; height: 18px; color: var(--green-500); }
.tile__value { font-family: var(--font-display); font-size: 32px; font-weight: 800; color: var(--green-900); line-height: 1.05; display: flex; align-items: center; gap: 8px; }
.tile__value .ic { width: 24px; height: 24px; color: var(--star); }
.tile__note { font-size: 13px; color: var(--slate); }
.tile--dark { background: radial-gradient(400px 160px at 100% 0, rgba(168, 217, 74, .18), transparent 70%), linear-gradient(135deg, var(--green-800), var(--green-950)); border-color: transparent; color: var(--white); }
.tile--dark .tile__label, .tile--dark .tile__note { color: rgba(255, 255, 255, .78); }
.tile--dark .tile__value { color: var(--white); }
.tile--dark .tile__label .ic { color: var(--lime); }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px 5px 14px 5px; background: var(--sand-50); border: 1px solid var(--sand-200); font-size: 14px; }
.callout > .ic { color: var(--tan-600); margin-top: 1px; }
.callout__body { display: grid; gap: 6px; min-width: 0; }
.callout__title { font-weight: 700; }
.callout--info { background: var(--info-bg); border-color: var(--info-line); }
.callout--info > .ic { color: var(--green-500); }
.callout--warn { background: var(--warn-bg); border-color: var(--warn-line); }
.callout--warn > .ic { color: var(--warn); }
.callout--danger { background: var(--danger-bg); border-color: var(--danger-line); }
.callout--danger > .ic { color: var(--danger); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.empty { text-align: center; padding: 34px 16px; color: var(--slate); display: grid; gap: 8px; justify-items: center; }
.empty .ic { width: 36px; height: 36px; color: var(--green-400); }
.empty__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--green-900); }

/* ---------- fields ---------- */
.fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: start; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field__label { font-weight: 600; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.field__req { color: var(--danger); font-weight: 700; }
.field__hint { font-size: 13px; color: var(--slate); }
.field__error { font-size: 13px; color: var(--danger); font-weight: 500; }
.field__error:empty { display: none; }
.field__count { margin-left: auto; font-size: 12px; color: var(--slate); font-weight: 500; font-variant-numeric: tabular-nums; }
.field__count.is-over { color: var(--warn); font-weight: 700; }
.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-input); background: var(--white); transition: border-color .15s, box-shadow .15s; }
.input:hover { border-color: #b4c0b8; }
.input:focus { outline: none; border-color: var(--green-500); box-shadow: var(--ring); }
.input::placeholder { color: #7d8983; }
.input:disabled, .input[readonly] { background: var(--sand-50); color: var(--slate); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
textarea.input--tall { min-height: 160px; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f5a31' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; }
.input[aria-invalid="true"] { border-color: var(--danger); background-color: #fffafa; }
.input--mono { font-family: var(--font-mono); font-size: 13px; }
.lfield { display: grid; gap: 8px; min-width: 0; }
.lfield__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lang { display: grid; gap: 6px; min-width: 0; align-content: start; }
.lang__label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--slate); font-weight: 500; }
.flag { display: inline-flex; align-items: center; justify-content: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; flex: none; }
.flag--en { background: var(--en-bg); color: var(--en); }
.flag--es { background: var(--es-bg); color: var(--es); }
.preview-h1 { font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.2; color: var(--green-900); padding: 10px 12px; background: var(--sand-50); border-radius: 10px; border: 1px dashed var(--sand-200); }
.preview-h1 .hl { background: linear-gradient(transparent 62%, rgba(168, 217, 74, .75) 62%); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: 14px; min-height: 40px; user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: var(--r-pill); background: var(--line-strong); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--green-500); }
.switch input:checked::after { transform: translateX(18px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: var(--r-pill); font-size: 14px; font-weight: 500; background: var(--white); transition: background .15s, border-color .15s; }
.chip span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
.chip input:checked + span { background: var(--green-100); border-color: var(--green-500); color: var(--green-900); }
.chip input:checked + span::before { background: var(--green-500); border-color: var(--green-500); }
.chip input:focus-visible + span { outline: 3px solid rgba(58, 143, 74, .6); outline-offset: 2px; }

/* ---------- list editor ---------- */
.items { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.item { background: var(--white); border: 1px solid var(--mist); border-radius: 14px 5px 14px 5px; box-shadow: 0 1px 2px rgba(15, 46, 26, .04); transition: box-shadow .15s, border-color .15s; min-width: 0; }
.item.is-open { border-color: #cbd6cf; box-shadow: var(--shadow-card); }
.item.is-off .item__title { color: var(--slate); }
.item.is-off .item__thumb, .item.is-off .item__icon { opacity: .45; filter: grayscale(.7); }
.item.is-dragging { opacity: .45; }
.item.is-drop-before { box-shadow: 0 -3px 0 var(--green-500); }
.item.is-drop-after { box-shadow: 0 3px 0 var(--green-500); }
.item__head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-width: 0; }
.item__grip { display: inline-flex; width: 26px; height: 40px; align-items: center; justify-content: center; color: #87958d; cursor: grab; border-radius: 8px; flex: none; }
.item__grip:active { cursor: grabbing; }
.item__pos { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; color: var(--slate); min-width: 22px; text-align: center; flex: none; }
.item__thumb { width: 60px; height: 60px; border-radius: 10px 4px 10px 4px; object-fit: cover; background: var(--sand-200); flex: none; }
.item__icon { width: 42px; height: 42px; border-radius: 10px 4px 10px 4px; background: var(--green-100); color: var(--green-700); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.item__icon .ic { width: 22px; height: 22px; }
.item__lead { display: flex; flex: none; }
.item__icon--text { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.cell-note { display: block; font-size: 12.5px; color: var(--slate); margin-top: 3px; font-weight: 400; }
.item__main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.item__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__meta { font-size: 13px; color: var(--slate); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.item__tools { display: flex; align-items: center; gap: 6px; flex: none; }
.item__body { padding: 18px 18px 20px; border-top: 1px solid var(--mist); display: grid; gap: 18px; }
.item__foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.toggle-open .ic { transition: transform .2s var(--ease); }
.is-open .toggle-open .ic { transform: rotate(180deg); }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--sand-200); color: #57461f; white-space: nowrap; }
.badge--off { background: #e9eceb; color: var(--slate); }
.badge--new { background: var(--green-100); color: var(--green-800); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.stars { display: inline-flex; gap: 1px; color: var(--star); vertical-align: middle; }
.stars .ic { width: 15px; height: 15px; }
.stars .is-empty { color: #d3d9d5; }
.thumb-preview { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: start; }
.thumb-preview__img { width: 160px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px 4px 12px 4px; background: var(--sand-200); border: 1px solid var(--mist); }
.thumb-preview__empty { width: 160px; aspect-ratio: 4 / 3; border-radius: 12px 4px 12px 4px; border: 1.5px dashed var(--line); background: var(--sand-50); color: var(--slate); display: grid; place-items: center; font-size: 13px; text-align: center; padding: 8px; }

/* ---------- pills, checklist, leads ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill--estimate { background: var(--green-100); color: var(--green-800); }
.pill--calendar { background: #e6eefb; color: #1d4580; }
.pill--text { background: #efe9fb; color: #52308a; }
.pill--feedback { background: var(--es-bg); color: var(--es); }
.pill--other { background: #eceeed; color: var(--slate); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; }
.check { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid var(--mist); }
.check:first-child { border-top: 0; padding-top: 2px; }
.check__mark { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.check__mark .ic { width: 16px; height: 16px; }
.check--ok .check__mark { background: var(--ok-bg); color: var(--green-700); }
.check--todo .check__mark { background: var(--danger-bg); color: var(--danger); }
.check--info .check__mark { background: #ebefec; color: var(--slate); }
.check--warn .check__mark { background: var(--warn-bg); color: var(--warn); }
.check__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.check__title { font-weight: 600; }
.check__state { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.check--ok .check__state { color: var(--green-700); }
.check--todo .check__state { color: var(--danger); }
.check--info .check__state { color: var(--slate); }
.check--warn .check__state { color: var(--warn); }
.check__text { font-size: 14px; color: var(--slate); margin-top: 2px; }
.check__where { font-size: 13px; margin-top: 6px; }
.mini-leads { list-style: none; margin: 0; padding: 0; display: grid; }
.mini-lead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--mist); }
.mini-lead:first-child { border-top: 0; padding-top: 0; }
.mini-lead__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-lead__meta { font-size: 13px; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { position: relative; flex: 1 1 240px; min-width: 0; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--slate); pointer-events: none; }
.search .input { padding-left: 40px; }
.toolbar select.input { width: auto; min-width: 200px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--mist); border-radius: 14px; background: var(--white); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { background: var(--sand-50); text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--slate); padding: 12px 14px; border-bottom: 1px solid var(--mist); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--mist); vertical-align: top; overflow-wrap: break-word; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfcfa; }
.cell-msg { min-width: 200px; max-width: 380px; white-space: pre-wrap; }
.cell-sub { display: block; margin-top: 4px; font-size: 13px; color: var(--slate); }
.cell-sub a { font-size: 14px; }
.cell-strong { font-weight: 600; }
.kv-table td:first-child { width: 34%; font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.status--on { color: var(--green-700); }
.status--on::before { background: var(--green-500); }
.status--off { color: var(--slate); }
.value-preview { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 12px; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.analysis { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.analysis li { display: flex; gap: 10px; align-items: flex-start; }
.analysis .ic { width: 18px; height: 18px; margin-top: 2px; }
.analysis .is-ok .ic { color: var(--green-500); }
.analysis .is-warn .ic { color: var(--warn); }
.analysis .is-bad .ic { color: var(--danger); }
.snippet-frame { display: block; width: 100%; height: 560px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--white); resize: vertical; overflow: auto; }
.linkbox { display: flex; gap: 8px; align-items: center; }
.linkbox .input { flex: 1; min-width: 0; }
.meter { height: 6px; border-radius: var(--r-pill); background: var(--mist); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--danger); transition: width .2s, background .2s; }
.meter.is-ok span { background: var(--tan); }
.meter.is-good span { background: var(--green-500); }

/* ---------- toasts & dialog ---------- */
.toasts { position: fixed; right: 20px; bottom: 104px; z-index: 60; display: grid; gap: 10px; justify-items: end; pointer-events: none; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; width: 380px; max-width: 100%; padding: 14px 16px; border-radius: 16px 5px 16px 5px; background: var(--green-950); color: var(--white);
  box-shadow: var(--shadow-pop); font-size: 14px; animation: toast-in .25s var(--ease); transition: opacity .2s, transform .2s; }
.toast > .ic { color: var(--lime); }
.toast--error { background: #4a1410; }
.toast--error > .ic { color: #ffb4a8; }
.toast__title { font-weight: 700; }
.toast__text { color: rgba(255, 255, 255, .84); margin-top: 2px; }
.toast__close { margin-left: auto; background: transparent; border: 0; color: rgba(255, 255, 255, .8); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.toast__close .ic { width: 16px; height: 16px; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dialog { border: 0; padding: 0; border-radius: 22px 8px 22px 8px; width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-pop); color: var(--ink); background: var(--white); }
.dialog::backdrop { background: rgba(11, 35, 20, .55); }
.dialog__inner { padding: 26px 26px 22px; display: grid; gap: 14px; margin: 0; }
.dialog__title { font-size: 22px; font-weight: 800; color: var(--green-900); }
.dialog__body { color: var(--slate); font-size: 15px; display: grid; gap: 10px; }
.dialog__body ul { margin: 0; padding-left: 20px; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  html { scroll-padding-top: 150px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 20; height: auto; padding: 10px 12px 0; overflow: visible; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
  .side__top { padding: 0 2px 10px; margin-bottom: 0; border-bottom: 0; }
  .side__logo { width: 38px; height: 38px; }
  .side__name { font-size: 18px; }
  .side__sub { font-size: 10.5px; }
  .side__quick { display: flex; gap: 8px; }
  .side__foot { display: none; }
  .side__nav { margin: 0 -12px; padding: 0 12px 10px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .side__nav::-webkit-scrollbar { display: none; }
  .tabs { flex-direction: row; gap: 6px; width: max-content; }
  .tab { min-height: 40px; padding: 8px 14px; white-space: nowrap; border-radius: var(--r-pill); font-size: 14px; background: rgba(255, 255, 255, .07); scroll-snap-align: start; }
  .tab[aria-selected="true"] { background: var(--white); color: var(--green-900); }
  .tab[aria-selected="true"] .ic { color: var(--green-700); }
  .tab[aria-selected="true"]::before { display: none; }
  .tab .ic { width: 18px; height: 18px; }
  .main { padding: 20px 16px 0; }
  .pane { min-height: auto; }
  .pane__actions { width: 100%; }
  .savebar { bottom: 0; margin: 8px -16px 0; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .toasts { left: 16px; right: 16px; bottom: 92px; justify-items: stretch; }
  .toast { width: auto; }
}
@media (max-width: 700px) {
  .lfield__pair { grid-template-columns: minmax(0, 1fr); }
  .item__grip, .item__pos { display: none; }
  .item__head { flex-wrap: wrap; padding: 10px; }
  .item__main { flex-basis: calc(100% - 150px); }
  .item__tools { width: 100%; justify-content: flex-end; border-top: 1px dashed var(--mist); padding-top: 8px; }
  .item__body { padding: 16px 14px 18px; }
  .thumb-preview { grid-template-columns: minmax(0, 1fr); }
  .savebar__status { flex: 1 1 100%; }
  .savebar__actions { width: 100%; }
  .savebar__actions .btn { flex: 1; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 14px; border-bottom: 1px solid var(--mist); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { padding: 4px 0; border: 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
  .table td::before { content: attr(data-label); font-size: 12px; font-weight: 600; color: var(--slate); text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
  .cell-msg { min-width: 0; max-width: none; }
  .toolbar select.input { width: 100%; }
  .login__card { padding: 28px 22px 22px; }
  .tiles { gap: 12px; }
  .tile { padding: 14px 16px; }
  .tile__value { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .is-booting .boot-msg { animation-delay: 4s !important; }
  .spin { animation: spin 1.6s linear infinite !important; }
}
