/* Customer portal (/cuenta) and admin CRM (/crm). Same tokens as site.css. */
/* The hidden attribute always wins over a component display rule (bug 2026-10-05: .cv-loading showed forever). */
[hidden] { display: none !important; }
:root {
  --bg: #080b0e; --s1: #0d1115; --s2: #12171c; --s3: #182027;
  --line: #1d252c; --line2: #2a343d; --line3: #3d4a55;
  --fg: #eef3f6; --fg2: #c4cdd5; --muted: #8b97a2;
  --accent: #8cc63f; --accent-hi: #a1d957; --accent-ink: #0b1205;
  --blue: #1aa3e8; --warn: #f2b14c; --bad: #ef6461;
  --r: 12px; --gut: 16px; --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.125rem; } h3 { font-size: 1rem; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.i { width: 18px; height: 18px; flex: none; }
.i--sm { width: 16px; height: 16px; } .i--xs { width: 13px; height: 13px; } .i--lg { width: 22px; height: 22px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- shell ---------- */
.ax-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 var(--gut); background: rgba(8,11,14,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.ax-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 600; font-size: .9375rem; }
.ax-brand:hover { text-decoration: none; }
.ax-brand img { width: 28px; height: 28px; object-fit: contain; }
.ax-brand small { display: block; font-weight: 450; color: var(--muted); font-size: .75rem; line-height: 1.1; }
.ax-top__end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ax-who { display: none; text-align: right; font-size: .8125rem; line-height: 1.25; }
.ax-who b { display: block; font-weight: 560; }
.ax-who span { color: var(--muted); }
.ax-search { display: none; position: relative; }
.ax-search input { width: 260px; height: 36px; padding: 0 12px 0 34px; border-radius: 9px; border: 1px solid var(--line2); background: var(--s1); color: var(--fg); font: inherit; font-size: .875rem; }
.ax-search .i { position: absolute; left: 10px; top: 9px; color: var(--muted); }

.ax-wrap { display: grid; min-height: calc(100vh - 58px); }
.ax-nav { position: sticky; top: 58px; z-index: 20; display: flex; gap: 4px; padding: 8px var(--gut); overflow-x: auto; scrollbar-width: none; background: var(--bg); border-bottom: 1px solid var(--line); }
.ax-nav::-webkit-scrollbar { display: none; }
.ax-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 9px; color: var(--muted); font-size: .875rem; font-weight: 500; white-space: nowrap; }
.ax-nav a:hover { color: var(--fg); background: var(--s2); text-decoration: none; }
.ax-nav a[aria-current="page"] { background: var(--s3); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line2); }
.ax-nav a[aria-current="page"] .i { color: var(--accent); }
.ax-nav__sep { display: none; }
.ax-nav .ax-nav__out { color: var(--muted); }
.ax-main { min-width: 0; padding: 20px var(--gut) 48px; }
.ax-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 18px; }
.ax-head p { color: var(--muted); margin-top: 4px; font-size: .9rem; }
.ax-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (min-width: 900px) {
  :root { --gut: 28px; }
  .ax-who, .ax-search { display: block; }
  .ax-wrap { grid-template-columns: 232px minmax(0, 1fr); }
  .ax-nav { flex-direction: column; top: 58px; align-self: start; height: calc(100vh - 58px); padding: 18px 14px; border-bottom: 0; border-right: 1px solid var(--line); overflow-y: auto; }
  .ax-nav__sep { display: block; margin: 10px 4px 6px; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: .8; }
  .ax-nav .ax-nav__out { margin-top: auto; }
  .ax-main { padding: 28px var(--gut) 60px; }
}

/* ---------- blocks ---------- */
.ax-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .ax-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ax-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ax-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ax-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ax-grid--main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.ax-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--s1); }
.ax-card + .ax-card { margin-top: 0; }
.ax-card__h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.ax-card__h h2 { display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; }
.ax-card__h h2 .i { color: var(--accent); }
.ax-stack { display: grid; gap: 12px; }
.ax-label { display: block; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ax-kpi { display: grid; gap: 4px; }
.ax-kpi b { font: 600 1.75rem/1.1 var(--mono); letter-spacing: -.02em; }
.ax-kpi b small { font-size: .9rem; color: var(--muted); font-weight: 500; margin-left: 3px; }
.ax-kpi span { color: var(--muted); font-size: .8125rem; }
.ax-big { font: 600 2.6rem/1 var(--mono); letter-spacing: -.03em; }
.ax-big small { font-size: 1rem; color: var(--muted); margin-left: 4px; }
.ax-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.ax-rows li:first-child { border-top: 0; }
.ax-rows li > span:first-child { color: var(--muted); }
.ax-rows li > span:last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.ax-empty { padding: 26px 12px; text-align: center; color: var(--muted); font-size: .9rem; }
.ax-note { padding: 12px 14px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line2); color: var(--fg2); font-size: .875rem; white-space: pre-line; }
.ax-note--warn { border-color: rgba(242,177,76,.45); background: rgba(242,177,76,.08); }
.ax-hero { display: grid; gap: 14px; padding: 20px; border-radius: 14px; border: 1px solid rgba(140,198,63,.35); background: linear-gradient(135deg, rgba(140,198,63,.12), rgba(26,163,232,.05) 60%), var(--s1); }
.ax-hero__top { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }

/* ---------- badges, flashes ---------- */
.ax-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 560; white-space: nowrap; border: 1px solid transparent; }
.ax-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ax-badge--ok { color: var(--accent); background: rgba(140,198,63,.1); border-color: rgba(140,198,63,.3); }
.ax-badge--warn { color: var(--warn); background: rgba(242,177,76,.1); border-color: rgba(242,177,76,.3); }
.ax-badge--bad { color: var(--bad); background: rgba(239,100,97,.1); border-color: rgba(239,100,97,.3); }
.ax-badge--info { color: var(--blue); background: rgba(26,163,232,.1); border-color: rgba(26,163,232,.3); }
.ax-badge--mute { color: var(--muted); background: var(--s2); border-color: var(--line2); }
.ax-flash { margin-bottom: 14px; padding: 11px 14px; border-radius: 10px; font-size: .9rem; border: 1px solid; }
.ax-flash--ok { color: #d7f0b8; background: rgba(140,198,63,.1); border-color: rgba(140,198,63,.35); }
.ax-flash--error { color: #ffd2d0; background: rgba(239,100,97,.1); border-color: rgba(239,100,97,.4); }
.ax-flash--info { color: #cbe9fa; background: rgba(26,163,232,.1); border-color: rgba(26,163,232,.35); }

/* ---------- buttons ---------- */
.ax-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line2); background: var(--s2); color: var(--fg); font: 500 .875rem var(--sans); cursor: pointer; white-space: nowrap; text-decoration: none; }
.ax-btn:hover { border-color: var(--line3); background: var(--s3); text-decoration: none; }
.ax-btn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.ax-btn--accent:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.ax-btn--danger { color: #ffd2d0; border-color: rgba(239,100,97,.45); background: rgba(239,100,97,.08); }
.ax-btn--sm { min-height: 32px; padding: 0 10px; font-size: .8125rem; }
.ax-btn--xs { min-height: 26px; padding: 0 9px; gap: 5px; border-radius: 7px; font-size: .75rem; color: var(--accent); border-color: rgba(140,198,63,.4); background: rgba(140,198,63,.08); }
.ax-btn--xs:hover { background: rgba(140,198,63,.16); border-color: var(--accent); }
.ax-inline { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.ax-btn--block { width: 100%; }
.ax-btn--wa { background: #25d366; border-color: #25d366; color: #062b14; font-weight: 600; }
.ax-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }

/* ---------- forms ---------- */
.ax-form { display: grid; gap: 14px; }
.ax-form__row { display: grid; gap: 14px; }
@media (min-width: 720px) { .ax-form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ax-form__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ax-field { display: grid; gap: 6px; min-width: 0; }
.ax-field > span { font-size: .8125rem; color: var(--fg2); font-weight: 500; }
.ax-field > small { color: var(--muted); font-size: .75rem; }
.ax-field input, .ax-field select, .ax-field textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line2);
  background: var(--bg); color: var(--fg); font: inherit; font-size: 16px;
}
.ax-field textarea { min-height: 96px; resize: vertical; }
.ax-field input:focus, .ax-field select:focus, .ax-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(140,198,63,.18); }
.ax-check { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.ax-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.ax-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
fieldset.ax-fs { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 0; display: grid; gap: 14px; }
fieldset.ax-fs legend { padding: 0 6px; font-weight: 600; font-size: .9375rem; }

/* ---------- tables ---------- */
.ax-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--s1); }
.ax-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.ax-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: .75rem; letter-spacing: .03em; text-transform: uppercase; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--s1); }
.ax-table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.ax-table tr:first-child td { border-top: 0; }
.ax-table tbody tr:hover td { background: var(--s2); }
.ax-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ax-table a.ax-row-link { color: var(--fg); font-weight: 520; }
.ax-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ax-filter input, .ax-filter select, .nm-bar input[type=search], .nm-bar select { min-height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line2); background: var(--s1); color: var(--fg); font: inherit; font-size: .875rem; }
.ax-filter input[type="search"] { flex: 1 1 220px; }

/* ---------- tabs inside a record ---------- */
.ax-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.ax-tabs a { padding: 9px 12px; color: var(--muted); font-size: .875rem; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.ax-tabs a:hover { color: var(--fg); text-decoration: none; }
.ax-tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }

/* ---------- timeline (installation QC log, tickets) ---------- */
.ax-tl { position: relative; display: grid; gap: 14px; margin: 0; padding-left: 20px; list-style: none; }
.ax-tl::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line2); }
.ax-tl li { position: relative; }
.ax-tl li::before { content: ""; position: absolute; left: -20px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--s1); border: 2px solid var(--accent); }
.ax-tl b { font-weight: 560; }
.ax-tl time { display: block; color: var(--muted); font-size: .75rem; }
.ax-msg { padding: 12px 14px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); max-width: 680px; }
.ax-msg--admin { background: rgba(140,198,63,.07); border-color: rgba(140,198,63,.25); margin-left: auto; }
.ax-msg header { display: flex; justify-content: space-between; gap: 10px; font-size: .75rem; color: var(--muted); margin-bottom: 6px; }
.ax-msg p { white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- calendar ---------- */
.ax-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--s1); }
.ax-cal__dow { padding: 8px; font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--line); text-align: center; }
.ax-cal__day { min-height: 92px; padding: 6px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); font-size: .75rem; }
.ax-cal__day:nth-child(7n+1) { border-left: 0; }
.ax-cal__day.is-out { opacity: .35; }
.ax-cal__day.is-today { background: rgba(140,198,63,.07); }
.ax-cal__n { display: block; font-family: var(--mono); color: var(--muted); margin-bottom: 4px; }
.ax-cal__day.is-today .ax-cal__n { color: var(--accent); font-weight: 600; }
.ax-cal__ev { display: block; margin-top: 3px; padding: 2px 5px; border-radius: 5px; background: var(--s3); color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--blue); }
.ax-cal__ev--installation { border-left-color: var(--accent); }
.ax-cal__ev--maintenance { border-left-color: var(--warn); }
@media (max-width: 640px) { .ax-cal__day { min-height: 64px; padding: 4px; } .ax-cal__ev { font-size: .625rem; padding: 1px 3px; } }

/* ---------- login ---------- */
.ax-login { min-height: 100vh; display: grid; place-items: center; padding: 24px var(--gut); background: radial-gradient(900px 500px at 50% -10%, rgba(140,198,63,.12), transparent 60%), var(--bg); }
.ax-login__box { width: 100%; max-width: 410px; display: grid; gap: 18px; }
.ax-login__card { padding: 26px 22px; border-radius: 16px; border: 1px solid var(--line2); background: var(--s1); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); display: grid; gap: 16px; }
.ax-login__brand { display: flex; align-items: center; gap: 12px; justify-content: center; color: var(--fg); }
.ax-login__brand img { width: 40px; height: 40px; }
.ax-login__brand b { display: block; font-size: 1.05rem; }
.ax-login__brand span { color: var(--muted); font-size: .8125rem; }
.ax-login__foot { text-align: center; font-size: .8125rem; color: var(--muted); }
.ax-login__foot a { color: var(--fg2); }
.ax-pw { position: relative; }
.ax-pw input { padding-right: 76px; }
.ax-pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line2); background: var(--s2); color: var(--fg2); font: 500 .75rem var(--sans); cursor: pointer; }

/* ---------- cuenta de cobro: the site's 4B language on paper ---------- */
.inv { --ink: #0d1115; --ink2: #3b4650; --mute: #6b7782; --rule: #e6eaee; --soft: #f5f7f8; --acc: #8cc63f; --acc-ink: #4d7a17;
  max-width: 820px; margin: 0 auto; background: #fff; color: var(--ink); border-radius: 16px; overflow: hidden; font: 400 14px/1.5 var(--sans);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.75); }
.inv__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 32px; background: #080b0e; color: #eef3f6; }
.inv__brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.0625rem; letter-spacing: -.01em; }
.inv__brand img { width: 32px; height: auto; }
.inv__brand b { font-weight: 600; }
.inv__doc { display: grid; justify-items: end; gap: 2px; }
.inv__eyebrow { font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); }
.inv__num { font: 500 1.25rem/1.1 var(--mono); letter-spacing: -.01em; }
.inv__strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
.inv__strip div { display: grid; gap: 4px; padding: 16px 20px; border-left: 1px solid var(--rule); }
.inv__strip div:first-child { border-left: 0; padding-left: 32px; }
.inv__strip span, .inv__label { font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.inv__strip b { font: 500 .875rem/1.3 var(--mono); }
.inv .is-accent { color: var(--acc-ink); }
.inv .is-red { color: #d23f37; }
.inv__label { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.inv__label i { font: normal 500 .6875rem var(--mono); color: var(--acc-ink); padding: 1px 6px; border: 1px solid #cfe3b5; border-radius: 5px; letter-spacing: 0; }
.inv__parties { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 24px 32px 8px; }
.inv__parties > div > b { display: block; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 6px; }
.inv__parties ul li { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-top: 1px solid var(--rule); font-size: .8125rem; }
.inv__parties ul li span:first-child { color: var(--mute); }
.inv__parties ul li span:last-child { text-align: right; overflow-wrap: anywhere; }
.inv__items { padding: 20px 32px 0; }
.inv__items table { width: 100%; border-collapse: collapse; }
.inv__items th { text-align: left; font-weight: 500; font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); padding: 0 0 8px; border-bottom: 1px solid var(--ink); }
.inv__items td { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.inv__items th + th, .inv__items td + td { padding-left: 14px; }
.inv .num { text-align: right; white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.inv__bottom { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; padding: 20px 32px 0; align-items: start; }
.inv__pay { padding: 16px 18px; border: 1px solid var(--rule); border-left: 3px solid var(--acc); border-radius: 12px; background: var(--soft); }
.inv__pay p { white-space: pre-line; font-size: .8125rem; line-height: 1.5; color: var(--ink2); }
.inv__pay .inv__pay-lead { font-size: .75rem; color: var(--mute); }
.inv__pay .inv__pay-bank { margin-top: 2px; font-weight: 600; color: var(--ink); }
.inv__pay .inv__pay-num { margin: 4px 0 2px; font: 500 1.375rem/1.15 var(--mono); letter-spacing: .01em; color: var(--ink); }
.inv__pay .inv__pay-holder { color: var(--ink); }
.inv__pay .inv__pay-how { margin-top: 8px; font-size: .75rem; color: var(--mute); }
.inv__pm { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--rule); font-size: .8125rem; color: var(--ink2); }
.inv__pm:first-of-type { border-top: 0; padding-top: 0; }
.inv__pm b { color: var(--ink); font-weight: 600; }
.inv__pm .inv__pay-num { font-size: 1rem; color: var(--ink); }
.inv__sum ul li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 2px; border-bottom: 1px solid var(--rule); font-size: .8125rem; }
.inv__sum ul li span:first-child { color: var(--mute); }
.inv__sum ul li span:last-child { font-family: var(--mono); }
.inv__due { margin-top: 12px; padding: 16px 18px; border-radius: 12px; background: #0d1115; color: #eef3f6; }
.inv__due-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: #8b97a2; }
.inv__due p { margin-top: 8px; font: 500 2rem/1 var(--mono); letter-spacing: -.02em; }
.inv__due small { font-size: .8125rem; color: #8b97a2; margin-left: 6px; letter-spacing: 0; }
.inv__pill { font-style: normal; padding: 2px 9px; border-radius: 999px; font-size: .6875rem; letter-spacing: .02em; text-transform: none; border: 1px solid; }
.inv__pill--paid { color: #8cc63f; border-color: rgba(140,198,63,.5); background: rgba(140,198,63,.12); }
.inv__pill--issued { color: #f2b14c; border-color: rgba(242,177,76,.5); background: rgba(242,177,76,.1); }
.inv__pill--void, .inv__pill--draft { color: #8b97a2; border-color: #3d4a55; }
.inv__note { margin: 14px 32px 0; font-size: .8125rem; color: var(--ink2); }
.inv__terms { margin: 22px 32px 0; padding-top: 16px; border-top: 1px solid var(--rule); }
.inv__terms .inv__label { margin-bottom: 6px; }
.inv__terms p { font-size: .75rem; line-height: 1.55; color: var(--mute); }
.inv a { color: var(--acc-ink); text-decoration: none; }
.inv__foot a { color: var(--mute); }
.inv__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 20px; padding: 14px 32px; border-top: 3px solid var(--acc); background: var(--soft); font-size: .75rem; color: var(--mute); }
@media (max-width: 680px) {
  .inv__top { padding: 16px 18px; } .inv__strip { grid-template-columns: 1fr 1fr; }
  .inv__strip div { padding: 12px 18px; } .inv__strip div:nth-child(3) { border-left: 0; padding-left: 18px; } .inv__strip div:first-child { padding-left: 18px; }
  .inv__strip div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .inv__parties, .inv__bottom { grid-template-columns: 1fr; padding-left: 18px; padding-right: 18px; }
  .inv__items { padding-left: 18px; padding-right: 18px; } .inv__terms, .inv__note { margin-left: 18px; margin-right: 18px; } .inv__foot { padding-inline: 18px; }
  .inv__items th:nth-child(2), .inv__items td:nth-child(2), .inv__items th:nth-child(3), .inv__items td:nth-child(3) { display: none; }
}
.inv-bar { max-width: 820px; margin: 0 auto 14px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
@media print {
  body { background: #fff; }
  .ax-top, .ax-nav, .inv-bar, .ax-flash, .no-print { display: none !important; }
  .ax-wrap { display: block; } .ax-main { padding: 0; }
  .inv { max-width: none; border-radius: 0; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: letter; margin: 8mm; }
}
/* Compact print layout; app.js adds .is-print before printing so it can measure and fit ONE page. */
.inv.is-print { font-size: 12.5px; max-width: none; border-radius: 0; box-shadow: none; }
.inv.is-print .inv__top { padding: 14px 24px; } .inv.is-print .inv__strip div { padding: 10px 16px; } .inv.is-print .inv__strip div:first-child { padding-left: 24px; }
.inv.is-print .inv__parties { padding: 14px 24px 4px; gap: 22px; } .inv.is-print .inv__parties ul li { padding: 5px 0; }
.inv.is-print .inv__items { padding: 12px 24px 0; } .inv.is-print .inv__items td { padding: 8px 0; }
.inv.is-print .inv__bottom { padding: 14px 24px 0; gap: 16px; } .inv.is-print .inv__pay { padding: 12px 14px; } .inv.is-print .inv__pay p { line-height: 1.4; }
.inv.is-print .inv__sum ul li { padding: 5px 2px; } .inv.is-print .inv__due { margin-top: 8px; padding: 12px 14px; } .inv.is-print .inv__due p { font-size: 1.6rem; }
.inv.is-print .inv__terms { margin: 14px 24px 0; padding-top: 10px; } .inv.is-print .inv__foot { margin-top: 12px; padding: 10px 24px; }

/* ---------- modal + proration preview ---------- */
.ax-modal { width: min(520px, calc(100vw - 24px)); padding: 0; border: 1px solid var(--line2); border-radius: 16px; background: var(--s1); color: var(--fg); box-shadow: 0 40px 80px -20px rgba(0,0,0,.85); }
.ax-modal::backdrop { background: rgba(4,6,8,.72); backdrop-filter: blur(3px); }
.ax-modal form { display: grid; gap: 14px; padding: 20px; }
.ax-modal__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ax-modal__x { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line2); background: var(--s2); color: var(--fg2); cursor: pointer; }
.ax-prorate { display: grid; gap: 0; padding: 4px 14px; border-radius: 12px; border: 1px solid rgba(140,198,63,.35); background: rgba(140,198,63,.07); }
.ax-prorate div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.ax-prorate div:first-child { border-top: 0; }
.ax-prorate span { color: var(--fg2); }
.ax-prorate b { font-family: var(--mono); font-weight: 600; text-align: right; }
.ax-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- CRM > Ajustes > Asistente ---------- */
.ax-mascots { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.ax-mascot { position: relative; display: grid; justify-items: center; gap: 4px; padding: 12px 8px 10px; border: 1px solid var(--line2); border-radius: 12px; background: var(--bg); cursor: pointer; text-align: center; }
.ax-mascot input { position: absolute; opacity: 0; }
.ax-mascot__img { display: grid; place-items: center; width: 96px; height: 117px; }
.ax-mascot__img img { max-width: 100%; max-height: 100%; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)); }
.ax-mascot b { font-size: .875rem; }
.ax-mascot small { color: var(--muted); font-size: .75rem; }
.ax-mascot:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(140,198,63,.18); background: rgba(140,198,63,.06); }
.ax-mascot:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ax-mascot.is-off { opacity: .45; cursor: not-allowed; }
.ax-looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ax-look { margin: 0; display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 10px; text-align: center; }
.ax-look img, .ax-look > span { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #1d2a33, #0e1418); display: grid; place-items: center; color: var(--muted); }
.ax-look figcaption { font-size: .6875rem; color: var(--muted); line-height: 1.25; }
.ax-look.is-on { border-color: var(--accent); }
.ax-look.is-off { opacity: .4; }

.ax-mascot-stage { display: grid; gap: 14px; align-items: start; }
@media (min-width: 1100px) { .ax-mascot-stage { grid-template-columns: minmax(0, 1fr) 200px; } }
.ax-mascot-big { margin: 0; display: grid; justify-items: center; gap: 8px; padding: 16px; border: 1px solid var(--line2); border-radius: 14px; background: radial-gradient(circle at 50% 30%, #17222a, #0b1014); }
.ax-mascot-big img { width: 150px; height: 183px; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0,0,0,.5)); }
.ax-mascot-big figcaption { font-weight: 600; }
.ax-cal-av { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #1d2a33, #0e1418); }
.ax-cal-edit input[type=date] { min-height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg); color: var(--fg); font: inherit; font-size: .875rem; color-scheme: dark; }
.ax-cal-edit tr.is-overlap td { background: rgba(239,100,97,.1); }
.ax-cal-edit tr.is-overlap input[type=date] { border-color: var(--bad); }
.ax-cal-edit tr.is-off td:not(:last-child) { opacity: .45; }

.ax-cal-zoom { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 50%; line-height: 0; }
.ax-cal-zoom:hover .ax-cal-av, .ax-cal-zoom:focus-visible .ax-cal-av { box-shadow: 0 0 0 2px var(--accent); }
.ax-mascot-big .ax-cal-zoom { border-radius: 12px; }
.ax-zoom { width: min(520px, calc(100vw - 24px)); }
.ax-zoom__stage { position: relative; width: min(400px, 78vw); aspect-ratio: 300 / 366; margin: 0 auto; border-radius: 14px; background: radial-gradient(circle at 50% 35%, #1b2830, #0a0f12); }
.ax-zoom__stage img { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 10px 12px rgba(0,0,0,.5)); }
.ax-zoom__stage img[data-z="b"], .ax-zoom__stage img[data-z="t"], .ax-zoom__stage img[data-z="w"] { opacity: 0; }
.ax-zoom__stage.is-blink img[data-z="b"], .ax-zoom__stage.is-talk img[data-z="t"] { opacity: 1; }
.ax-zoom__stage.is-wave img[data-z="w"] { opacity: 1; }
.ax-zoom__stage.is-wave img[data-z="l"], .ax-zoom__stage.is-wave img[data-z="b"], .ax-zoom__stage.is-wave img[data-z="t"] { opacity: 0; }

.ax-dm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .875rem; color: var(--fg2); }
.ax-dm select, .ax-dm input[type=number] { min-height: 34px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg); color: var(--fg); font: inherit; font-size: .875rem; }
.ax-dm input[type=number] { width: 58px; }
.ax-cal-edit tr.is-overlap select, .ax-cal-edit tr.is-overlap input[type=number] { border-color: var(--bad); }

/* Clickable list rows + actions column */
.ax-table tr[data-href] { cursor: pointer; }
.ax-table tr[data-href]:hover td { background: var(--s3); }
.ax-table tr[data-href]:hover .ax-row-link { color: var(--accent); }
.ax-col-actions { text-align: right; white-space: nowrap; }
td.ax-col-actions .ax-btn + .ax-btn { margin-left: 6px; }

/* ---------- Network map (/crm/redes) and UISP antennas ---------- */
.ax-sig--ok { color: var(--accent); } .ax-sig--warn { color: var(--warn); } .ax-sig--bad { color: var(--bad); } .ax-sig--mute { color: var(--muted); }
.nm-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.nm-stat { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--s1, rgba(255,255,255,.03)); color: inherit; font: inherit; cursor: pointer; }
div.nm-stat { cursor: default; }
.nm-stat b { font: 600 1.45rem/1.1 var(--mono); }
.nm-stat span { color: var(--muted); font-size: .8rem; }
.nm-stat--ok b { color: var(--accent); } .nm-stat--bad b { color: var(--bad); } .nm-stat--warn b { color: var(--warn); } .nm-stat--mute b { color: var(--muted); }
.nm-stat.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.nm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.nm-bar input[type=search] { flex: 1 1 220px; min-width: 0; }
.nm-bar select { flex: 1 1 200px; max-width: 280px; min-width: 0; }
@media (max-width: 760px) { .nm-bar select { max-width: none; } }
.nm-sites { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.nm-site { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: inherit; font: inherit; font-size: .8125rem; cursor: pointer; }
.nm-site i, .nm-pop dd i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.nm-pop dd i { margin-right: 6px; vertical-align: -1px; }
.nm-site small { color: var(--muted); }
.nm-site.is-off { opacity: .4; text-decoration: line-through; }
.nm-map { position: relative; height: min(72vh, 760px); min-height: 420px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); background: #0b1018; }
.nm-loading { display: grid; place-items: center; height: 100%; color: var(--muted); }
.nm-stale { color: var(--warn) !important; }
.nm-dot-wrap { background: none; border: 0; }
.nm-dot { display: block; width: 12px; height: 12px; margin: 2px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.45); }
.nm-dot--off { border-style: dashed; opacity: .7; }
.nm-dot--crit { box-shadow: 0 0 0 3px rgba(242,177,76,.85); }
.nm-tower { background: none; border: 0; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.nm-cluster { display: grid; place-items: center; border-radius: 50%; background: rgba(140,198,63,.28); border: 2px solid rgba(140,198,63,.85); }
.nm-cluster span { font: 700 .8rem/1 var(--mono); color: #fff; text-shadow: 0 1px 2px #000; }
.nm-cluster--off { background: rgba(239,100,97,.25); border-color: rgba(239,100,97,.85); }
.nm-popup .leaflet-popup-content-wrapper, .nm-popup .leaflet-popup-tip { background: #121a26; color: #e6edf5; border: 1px solid rgba(255,255,255,.12); }
.nm-popup .leaflet-popup-content { margin: 12px 14px; font: 13px/1.45 var(--sans, system-ui); }
.nm-popup a.leaflet-popup-close-button { color: #8b97a8; }
.nm-pop__t { display: block; font-family: var(--mono); font-size: 13px; margin: 0 18px 6px 0; }
.nm-pop dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 8px 0 10px; }
.nm-pop dt { color: #8b97a8; } .nm-pop dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.nm-pop a { color: #8cc63f; }
.nm-pop__a { display: flex; flex-wrap: wrap; gap: 6px; }
.nm-pop__a .ax-btn--accent { color: #0b1018; }
.nm-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid; }
.nm-pill--ok { color: #8cc63f; border-color: rgba(140,198,63,.4); } .nm-pill--bad { color: #ef6461; border-color: rgba(239,100,97,.45); } .nm-pill--warn { color: #f2b14c; border-color: rgba(242,177,76,.45); }
.nm-sig--ok { color: #8cc63f; } .nm-sig--warn { color: #f2b14c; } .nm-sig--bad { color: #ef6461; } .nm-sig--mute { color: #8b97a8; }
.leaflet-container .leaflet-control-layers, .leaflet-container .leaflet-bar a { background: #121a26; color: #e6edf5; border-color: rgba(255,255,255,.12); }
@media (max-width: 760px) { .nm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nm-map { height: 64vh; min-height: 360px; } }
.nm-bar input[type=search]:focus, .nm-bar select:focus { outline: none; border-color: var(--accent); }
.ax-table td.mono .ax-sig--ok, .ax-table td.mono .ax-sig--warn, .ax-table td.mono .ax-sig--bad { white-space: nowrap; }
.ax-table td.mono:has(.ax-sig--ok, .ax-sig--warn, .ax-sig--bad, .ax-sig--mute) { white-space: nowrap; }

/* ---------- Billing accounts on the customer page ---------- */
.ax-acc { border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.ax-acc__h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.ax-acc__svc { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed var(--line); }
.ax-acc__svc:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.ax-acc__new > summary { list-style: none; display: inline-flex; cursor: pointer; }
.ax-acc__new > summary::-webkit-details-marker { display: none; }
.ax-svc + .ax-svc { margin-top: 12px; }
.ax-acc-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 18px 0 10px; }
.ax-acc-title h2 { font-size: 1.05rem; margin: 0; }

/* ---------- Sortable table headers ---------- */
.ax-sort { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.ax-sort:hover, .ax-sort.is-on { color: var(--fg); }
.ax-sort__i { font-size: .7rem; opacity: .45; }
.ax-sort.is-on .ax-sort__i { opacity: 1; color: var(--accent); }

/* ---------- Coverage check (/crm/cobertura), port of New_Costumers ---------- */
.cv { display: grid; gap: 14px; }
@media (min-width: 1100px) { .cv { grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); align-items: start; } }
.cv-side { display: grid; gap: 14px; min-width: 0; }
.cv-main { display: grid; gap: 14px; min-width: 0; }
.cv-wide { width: 100%; justify-content: center; margin-top: 10px; }
.cv-map { height: min(68vh, 720px); min-height: 380px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); background: #0b1018; }
.cv-alerts .ax-flash { margin: 12px 0 0; transition: opacity .3s; }
.cv-loading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 12px; color: var(--muted); font-size: .9rem; }
.cv-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--accent); animation: cvspin .8s linear infinite; }
@keyframes cvspin { to { transform: rotate(360deg); } }
.cv-verdict { display: grid; gap: 4px; padding: 14px; border-radius: 12px; border: 1px solid; margin-bottom: 12px; }
.cv-verdict span { font-size: .8rem; color: var(--muted); }
.cv-verdict b { font: 700 1.15rem/1.2 var(--sans); letter-spacing: .02em; }
.cv-verdict--ok { border-color: rgba(140,198,63,.45); background: rgba(140,198,63,.08); } .cv-verdict--ok b { color: var(--accent); }
.cv-verdict--bad { border-color: rgba(239,100,97,.45); background: rgba(239,100,97,.08); } .cv-verdict--bad b { color: var(--bad); }
.cv-tower { border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.cv-tower--los { border-color: rgba(140,198,63,.5); } .cv-tower--obs { border-color: rgba(239,100,97,.5); }
.cv-tower__h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.cv-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0; }
.cv-metrics div { min-width: 0; } .cv-metrics dt { color: var(--muted); font-size: .75rem; } .cv-metrics dd { margin: 0; font-family: var(--mono); font-size: .875rem; overflow-wrap: anywhere; }
.cv-metrics small { font-family: var(--sans); color: var(--muted); font-size: .72rem; }
.cv-msg { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: .85rem; line-height: 1.45; border: 1px solid; }
.cv-msg--ok { color: #d7f0b8; background: rgba(140,198,63,.1); border-color: rgba(140,198,63,.35); }
.cv-msg--bad { color: #ffd2d0; background: rgba(239,100,97,.1); border-color: rgba(239,100,97,.4); }
.cv-chart__canvas { position: relative; height: 300px; }
.cv-chart__legend { text-align: center; margin-top: 8px; font-weight: 600; }
.cv-ok { color: var(--accent); } .cv-bad { color: var(--bad); }
.cv-towers { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.cv-tbtn.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cv-tbtn--obs { border-color: rgba(239,100,97,.5); } .cv-tbtn--ok { border-color: rgba(140,198,63,.5); }
.cv-pin { background: none; border: 0; }
.cv-pin__in { display: flex; flex-direction: column; align-items: center; }
.cv-pin__label { font: 700 12px/1.2 var(--sans); color: #2c3e50; white-space: nowrap; margin-bottom: 2px;
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff, 0 0 8px rgba(255,255,255,.9), 0 0 15px rgba(255,255,255,.7); }
.cv-pin__dot { border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
@media (max-width: 760px) { .cv-map { height: 56vh; min-height: 320px; } .cv-chart__canvas { height: 240px; } }

/* ---------- CRM > Sistemas: solar towers (port of Solar2025) ---------- */
.sy-ok { color: #22c55e; } .sy-warn { color: #fbbf24; } .sy-crit { color: #ef4444; } .sy-solar { color: #f59e0b; } .sy-blue { color: #60a5fa; }
.sy-cards { display: grid; gap: 14px; }
@media (min-width: 760px) { .sy-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .sy-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sy-card { display: block; color: inherit; text-decoration: none; transition: transform .2s, border-color .2s; border: 1px solid var(--line2); }
.sy-card:hover { transform: translateY(-3px); border-color: rgba(245,158,11,.6); }
.sy-card--warning { border-color: rgba(251,191,36,.7); animation: syPulseW 2s infinite; }
.sy-card--critical { border-color: rgba(239,68,68,.8); animation: syPulseC 1.5s infinite; }
@keyframes syPulseW { 50% { box-shadow: 0 0 0 4px rgba(251,191,36,.18); } }
@keyframes syPulseC { 50% { box-shadow: 0 0 0 5px rgba(239,68,68,.25); } }
.sy-card__h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sy-card__h b { flex: 1; font-size: 1.05rem; }
.sy-card__f { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.sy-card__off { color: var(--muted); padding: 22px 0; text-align: center; }
.sy-status { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 2px rgba(255,255,255,.06); background: #22c55e; }
.sy-status--warning { background: #fbbf24; } .sy-status--critical { background: #ef4444; }
.sy-tdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: 2px; }
.sy-alerts { display: grid; gap: 8px; margin-bottom: 14px; }
.sy-alert { display: flex; gap: 8px; align-items: baseline; padding: 10px 14px; border-radius: 10px; border-left: 4px solid; font-size: .9rem; animation: sySlide .3s; }
.sy-alert time { margin-left: auto; color: var(--muted); font-size: .78rem; white-space: nowrap; }
.sy-alert--critical { background: rgba(127,29,29,.55); border-color: #ef4444; color: #fecaca; }
.sy-alert--warning { background: rgba(113,63,18,.55); border-color: #eab308; color: #fef08a; }
@keyframes sySlide { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 640px) { .sy-alert time { display: none; } }
.sy-select { min-height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line2); background: var(--s1); color: var(--fg); font: inherit; font-size: .85rem; max-width: 100%; }
.sy-chart { position: relative; height: 250px; }
.sy-chart--bar { height: 280px; }
@media (min-width: 768px) { .sy-chart { height: 300px; } }
.sy-range { align-items: center; }
.sy-range label { display: inline-flex; align-items: center; gap: 6px; }
.sy-range input { min-height: 36px; }
.sy-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
@media (min-width: 768px) { .sy-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sy-charts { display: grid; gap: 14px; margin-bottom: 14px; }
@media (min-width: 1100px) { .sy-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sy-charts .ax-card__h h2 { font-size: .95rem; }
.sy-extra { margin-bottom: 14px; }
.sy-extra > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.sy-extra > summary::after { content: '▾'; color: var(--muted); transition: transform .2s; }
.sy-extra[open] > summary::after { transform: rotate(180deg); }
.sy-extra > summary::-webkit-details-marker { display: none; }
.sy-extra > summary h2 { font-size: 1rem; margin: 0; }
.sy-extra[open] > .sy-charts { margin-top: 14px; margin-bottom: 0; }
.sy-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { .sy-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .sy-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.sy-tile { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line); min-width: 0; }
.sy-tile span { font-size: .75rem; color: var(--muted); } .sy-tile b { font: 600 1rem/1.3 var(--mono); overflow-wrap: anywhere; } .sy-tile small { font-size: .72rem; }
.sy-detail > .ax-card, .sy-detail section.ax-card { margin-bottom: 14px; }
[data-sy-refresh].is-busy .i { animation: cvspin .8s linear infinite; }
.st-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 24px 0; }

.st-frame { display: block; width: 100%; min-height: 720px; border: 1px solid var(--line2); border-radius: 14px; background: #000; }
/* Tower cards are links: no underline on hover (the lift + border is the hover effect). */
a.sy-card, a.sy-card:hover, a.sy-card * { text-decoration: none; }
.sy-card .ax-rows li.sy-sub { padding-top: 0; border-top: 0; margin-top: -6px; }
.sy-card .ax-rows li.sy-sub span { font-size: .75rem; color: var(--muted); }

/* ---------- Almanaque: kinds, dialog, drag and drop ---------- */
button.ax-cal__ev { width: 100%; text-align: left; font: inherit; font-size: .75rem; border: 0; border-left: 3px solid var(--blue); cursor: pointer; }
button.ax-cal__ev:hover { background: var(--s2); color: var(--fg); }
.ax-cal__ev .i { vertical-align: -1px; margin-right: 3px; color: var(--blue); }
.ax-cal__ev[draggable="true"] { cursor: grab; }
.ax-cal__ev.is-dragging { opacity: .4; }
.ax-cal__ev.is-resolved { opacity: .6; text-decoration: line-through; }
.ax-cal__ev--outage { border-left-color: #ef4444; } .ax-cal__ev--network_issue { border-left-color: #f97316; } .ax-cal__ev--emergency_repair { border-left-color: #e11d48; }
.ax-cal__ev--notice { border-left-color: #0ea5e9; } .ax-cal__ev--tower_work { border-left-color: #f59e0b; } .ax-cal__ev--tower_event { border-left-color: #a855f7; }
.ax-cal__ev--other_work { border-left-color: #14b8a6; } .ax-cal__ev--visit { border-left-color: #64748b; } .ax-cal__ev--billing { border-left-color: #84cc16; } .ax-cal__ev--other { border-left-color: #94a3b8; }
.ax-cal__day.is-drop { background: rgba(140,198,63,.12); box-shadow: inset 0 0 0 2px var(--accent); }
button.ax-cal__n { border: 0; background: none; padding: 0 4px; border-radius: 6px; cursor: pointer; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
button.ax-cal__n:hover { background: var(--s3); color: var(--fg); }
.ax-cal-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 12px; }
.ax-cal-legend .ax-cal__ev { display: inline-block; margin: 0; font-size: .72rem; }
.ax-modal--wide { width: min(680px, calc(100vw - 32px)); }
.ev-view .ev-title { font-size: 1.05rem; margin-bottom: 8px; }
.ev-view .ax-rows { margin-bottom: 14px; }
.ev-view .ax-rows li > span:last-child { white-space: pre-line; }
.ev-more { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ev-more form { display: inline; }
.ax-modal--wide > div > .ax-modal__h { padding: 18px 20px 0; }
.ax-modal--wide .ev-view { padding: 14px 20px 0; }
.ax-modal--wide .ev-view:empty { display: none; }
.ax-modal--wide .ev-more { margin: 0 20px 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.ax-modal--wide .ev-more form { display: inline-block; padding: 0; gap: 0; }
.ax-modal--wide [data-ev-form] { padding-top: 14px; }

/* ---------- Almanaque 3D: today stands out, the selected day rises like a button and grows ---------- */
.ax-cal { perspective: 1100px; overflow: visible; gap: 0; }
.ax-cal__day { position: relative; cursor: pointer; outline: none;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s, border-radius .25s; }
.ax-cal__day:hover { z-index: 2; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(14px);
  background: var(--s2); border-radius: 10px; box-shadow: 0 14px 26px -12px rgba(0,0,0,.8); }
.ax-cal__top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.ax-cal__n { font-family: var(--mono); color: var(--muted); }
.ax-cal__count { font: 600 .65rem/1 var(--mono); padding: 2px 6px; border-radius: 999px; background: var(--s3); color: var(--fg2); }
.ax-cal__add { margin-left: auto; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border-radius: 6px; border: 1px solid var(--line2);
  background: var(--s1); color: var(--accent); cursor: pointer; opacity: 0; transform: scale(.7); transition: opacity .2s, transform .2s; }
.ax-cal__day:hover .ax-cal__add, .ax-cal__day.is-selected .ax-cal__add, .ax-cal__add:focus-visible { opacity: 1; transform: scale(1); }
.ax-cal__ev.is-extra { display: none; }
.ax-cal__more { display: block; margin-top: 3px; font-size: .68rem; color: var(--accent); }

/* Today: raised tile with a soft breathing ring */
.ax-cal__day.is-today { z-index: 1; border-radius: 10px; background: linear-gradient(160deg, rgba(140,198,63,.22), rgba(140,198,63,.05) 60%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -2px 0 rgba(0,0,0,.35), 0 8px 18px -10px rgba(140,198,63,.55);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(8px); }
.ax-cal__day.is-today::after { content: ''; position: absolute; inset: 2px; border-radius: 9px; border: 1px solid rgba(140,198,63,.6);
  pointer-events: none; animation: calBreath 2.6s ease-in-out infinite; }
@keyframes calBreath { 50% { box-shadow: 0 0 0 4px rgba(140,198,63,.12), 0 0 18px rgba(140,198,63,.25); border-color: rgba(140,198,63,.95); } }
.ax-cal__day.is-today .ax-cal__n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 7px; background: var(--accent); color: #0b1018; font-weight: 700; }

/* Selected: a pressed-out 3D button that grows to show every event */
/* Selected = blue (today keeps its green), so "today" and "the day I picked" never look the same */
.ax-cal__day.is-selected { z-index: 3; border-radius: 12px; background: linear-gradient(165deg, #16304a, #0f1b28);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(26px) scale(1.04);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 -3px 0 rgba(0,0,0,.45), 0 0 0 2px #1aa3e8, 0 22px 40px -14px rgba(0,0,0,.9), 0 0 30px rgba(26,163,232,.35); }
.ax-cal__day.is-selected:not(.is-today) .ax-cal__n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 7px; background: #1aa3e8; color: #fff; }
.ax-cal__day.is-selected .ax-cal__ev.is-extra { display: block; animation: calPop .25s both; }
.ax-cal__day.is-selected .ax-cal__more { display: none; }
.ax-cal__day.is-selected .ax-cal__ev { white-space: normal; }
.ax-cal__day.is-selected .ax-cal__n { color: var(--fg); font-weight: 700; }
.ax-cal__day:focus-visible { box-shadow: 0 0 0 2px var(--blue); }
@keyframes calPop { from { opacity: 0; transform: translateY(-4px); } }
.ax-cal__day.is-out:hover, .ax-cal__day.is-out.is-selected { opacity: .85; }

/* Day panel */
.ax-daypanel.is-flash { animation: dpFlash .45s ease-out; }
@keyframes dpFlash { from { box-shadow: 0 0 0 2px rgba(26,163,232,.6); } }
.ax-dplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ax-dpitem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); border-left: 4px solid var(--blue); background: var(--s2); cursor: pointer;
  transform: perspective(600px) translateZ(0); transition: transform .2s, box-shadow .2s, background .2s; animation: calPop .3s both; animation-delay: calc(var(--i) * 40ms); }
.ax-dpitem:hover, .ax-dpitem:focus-visible { transform: perspective(600px) translateZ(14px); background: var(--s3); box-shadow: 0 12px 22px -12px rgba(0,0,0,.8); outline: none; }
.ax-dpitem__t { font: 600 .8rem/1 var(--mono); color: var(--fg2); }
.ax-dpitem__b { display: grid; gap: 2px; min-width: 0; } .ax-dpitem__b b { overflow-wrap: anywhere; font-size: .9rem; } .ax-dpitem__b small { color: var(--muted); font-size: .75rem; }
.ax-dpitem__s { display: grid; gap: 4px; justify-items: end; }
.ax-dpitem.ax-cal__ev--outage { border-left-color: #ef4444; } .ax-dpitem.ax-cal__ev--network_issue { border-left-color: #f97316; } .ax-dpitem.ax-cal__ev--emergency_repair { border-left-color: #e11d48; }
.ax-dpitem.ax-cal__ev--notice { border-left-color: #0ea5e9; } .ax-dpitem.ax-cal__ev--tower_work { border-left-color: #f59e0b; } .ax-dpitem.ax-cal__ev--tower_event { border-left-color: #a855f7; }
.ax-dpitem.ax-cal__ev--other_work { border-left-color: #14b8a6; } .ax-dpitem.ax-cal__ev--installation { border-left-color: var(--accent); } .ax-dpitem.ax-cal__ev--maintenance { border-left-color: var(--warn); }
.ax-dpitem.ax-cal__ev--visit { border-left-color: #64748b; } .ax-dpitem.ax-cal__ev--billing { border-left-color: #84cc16; }
@media (prefers-reduced-motion: reduce) { .ax-cal__day, .ax-dpitem { transition: none; animation: none; } .ax-cal__day.is-today::after { animation: none; } }
@media (max-width: 640px) { .ax-cal__day.is-selected { transform: translateZ(10px) scale(1.02); } .ax-cal__add { opacity: 1; transform: none; width: 18px; height: 18px; } }
.ax-publist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ax-publist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.ax-pubitem { display: grid; gap: 3px; justify-items: start; width: 100%; text-align: left; font: inherit; color: inherit; padding: 9px 11px; border-radius: 11px;
  border: 1px solid var(--line2); border-left: 4px solid var(--blue); background: var(--s2); cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s; }
.ax-pubitem:hover, .ax-pubitem:focus-visible { transform: perspective(600px) translateZ(10px); background: var(--s3); box-shadow: 0 10px 20px -12px rgba(0,0,0,.8); outline: none; }
.ax-pubitem b { font-size: .88rem; overflow-wrap: anywhere; } .ax-pubitem small { color: var(--muted); font-size: .74rem; }
.ax-pubstatus select { min-height: 32px; max-width: 132px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line2); background: var(--s1); color: var(--fg); font: inherit; font-size: .78rem; }
.ax-pubitem.ax-cal__ev--outage { border-left-color: #ef4444; } .ax-pubitem.ax-cal__ev--network_issue { border-left-color: #f97316; } .ax-pubitem.ax-cal__ev--emergency_repair { border-left-color: #e11d48; }
.ax-pubitem.ax-cal__ev--notice { border-left-color: #0ea5e9; } .ax-pubitem.ax-cal__ev--tower_work { border-left-color: #f59e0b; } .ax-pubitem.ax-cal__ev--tower_event { border-left-color: #a855f7; }
.ax-pubitem.ax-cal__ev--other_work { border-left-color: #14b8a6; } .ax-pubitem.ax-cal__ev--maintenance { border-left-color: var(--warn); }

/* Calendar chips are not buttons any more (a tap selects the day): plain cursor, drag handle feel */
.ax-cal button.ax-cal__ev { cursor: pointer; } .ax-cal button.ax-cal__ev[draggable="true"] { cursor: grab; }
.ax-cal__ev--coverage_check { border-left-color: #22d3ee; } .ax-cal__ev--fault_check { border-left-color: #fb7185; } .ax-cal__ev--tech_visit { border-left-color: #818cf8; }
.ax-cal__ev--relocation { border-left-color: #c084fc; } .ax-cal__ev--equipment_change { border-left-color: #fbbf24; } .ax-cal__ev--equipment_removal { border-left-color: #78716c; }
.ax-cal__ev--reconnection { border-left-color: #4ade80; }
.ax-dpitem.ax-cal__ev--coverage_check { border-left-color: #22d3ee; } .ax-dpitem.ax-cal__ev--fault_check { border-left-color: #fb7185; } .ax-dpitem.ax-cal__ev--tech_visit { border-left-color: #818cf8; }
.ax-dpitem.ax-cal__ev--relocation { border-left-color: #c084fc; } .ax-dpitem.ax-cal__ev--equipment_change { border-left-color: #fbbf24; } .ax-dpitem.ax-cal__ev--equipment_removal { border-left-color: #78716c; }
.ax-dpitem.ax-cal__ev--reconnection { border-left-color: #4ade80; }
.ax-msg--system { border-style: dashed; background: transparent; }
.ax-msg--system header b { color: var(--muted); }
.ax-radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 12px; cursor: pointer; }
.ax-radio:has(input:checked) { border-color: var(--accent); background: rgba(140,198,63,.06); }
.ax-radio input { margin-top: 4px; accent-color: var(--accent); }
.ax-sup-ai { display: flex; gap: 16px; align-items: center; }
.ax-sup-ai img { width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #1d2a33, #0e1418); flex: none; }
.ax-sup-ai h2 { font-size: 1.1rem; margin: 0 0 4px; }
@media (max-width: 560px) { .ax-sup-ai { flex-direction: column; text-align: center; } }
.ax-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.ax-col-check { width: 44px; text-align: center; }
.ax-check-cell { display: grid; place-items: center; padding: 6px; margin: -6px; cursor: pointer; }
.ax-check-cell input, .ax-bulk input { width: 17px; height: 17px; accent-color: var(--bad); }
tr.is-picked td { background: rgba(239,100,97,.07); }
.ax-note--danger { border-color: rgba(239,100,97,.5); background: rgba(239,100,97,.08); color: #ffd2d0; }

/* ---------- Support chat (portal + CRM) ---------- */
.chat { max-width: 920px; display: grid; gap: 12px; position: relative; border-radius: 16px; }
.chat.is-drop { outline: 2px dashed var(--accent); outline-offset: 6px; }
.chat-log { display: grid; gap: 10px; align-content: start; max-height: max(320px, calc(100dvh - 330px)); overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 4px 0; scroll-padding: 12px; }
/* Computer: the chat is a framed window sized by chat.js to the rest of the screen, full content width; only the
   conversation scrolls (its top edge fades so a half-scrolled message never looks cut), composer docked below. */
.ax-main.has-chat { padding-bottom: 14px; }
.chat.is-fit { display: flex; flex-direction: column; gap: 0; max-width: none; border: 1px solid var(--line2); background: var(--s1); overflow: hidden; }
.chat.is-fit > * { flex: none; }
.chat.is-fit > .chat-log { flex: 1 1 auto; min-height: 0; max-height: none; padding: 18px 18px 14px; gap: 12px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px); mask-image: linear-gradient(to bottom, transparent 0, #000 22px); }
.chat.is-fit > #fin { display: none; }
.chat.is-fit > .chat-warn, .chat.is-fit > .chat-closing { margin: 0 14px 10px; }
.chat.is-fit > .chat-composer { position: static; border: 0; border-top: 1px solid var(--line2); border-radius: 0; background: var(--s2); backdrop-filter: none; padding: 12px 14px; }
.chat.is-fit .chat-bubble { max-width: min(70%, 760px); }
.chat-msg { align-items: center; gap: 6px; }
.chat-msg--mine { flex-direction: row-reverse; justify-content: flex-start; }   /* reversed row: flex-start is the RIGHT side */
.chat-reply { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line2); background: var(--s1); color: var(--muted); font: inherit; font-size: .74rem; cursor: pointer; opacity: 0; transition: opacity .15s; }
.chat-msg:hover .chat-reply, .chat-reply:focus-visible { opacity: 1; }
.chat-reply:hover { color: var(--fg); border-color: var(--accent); }
@media (hover: none) { .chat-reply { opacity: .85; padding: 6px 8px; } .chat-reply svg + * { display: none; } }
.chat-quote { display: grid; gap: 2px; margin: 2px 0 6px; padding: 6px 10px; border-left: 3px solid var(--accent); border-radius: 8px; background: rgba(127,127,127,.10); color: inherit; text-decoration: none; font-size: .8rem; }
.chat-quote b { font-size: .74rem; color: var(--accent); }
.chat-quote span { color: var(--fg2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chat-quote:hover { background: rgba(127,127,127,.18); }
.chat-msg.is-flash .chat-bubble { animation: chatFlash 1.6s ease-out; }
@keyframes chatFlash { 0%, 30% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.chat-replybar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-left: 3px solid var(--accent); border-radius: 10px; background: rgba(127,127,127,.10); font-size: .82rem; }
.chat-replybar div { display: grid; min-width: 0; } .chat-replybar b { font-size: .76rem; color: var(--accent); }
.chat-replybar div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg2); }
.chat-replybar__x { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line2); background: var(--s1); color: var(--fg); cursor: pointer; line-height: 1; }
.ax-countdown { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.ax-countdown b { color: var(--warn); font-variant-numeric: tabular-nums; }
.ax-countdown.is-soon b { color: var(--bad); }
td .ax-countdown { display: flex; margin: 4px 0 0; }
.chat-closing { margin: 0; } .chat-closing .ax-countdown { margin: 0; font-size: inherit; color: inherit; }
.chat-msg { display: flex; }
.chat-bubble { max-width: min(78%, 620px); padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--s2); border: 1px solid var(--line2); }
.chat-msg--mine .chat-bubble { border-radius: 16px 16px 4px 16px; background: rgba(140,198,63,.12); border-color: rgba(140,198,63,.35); }
.chat-bubble header { display: flex; justify-content: space-between; gap: 12px; font-size: .78rem; margin-bottom: 4px; }
.chat-bubble header b { color: var(--fg); } .chat-bubble header time, .chat-msg--system time { color: var(--muted); }
.chat-bubble p { margin: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.chat-msg--system { justify-content: center; }
.chat-msg--system .chat-bubble { max-width: 90%; text-align: center; background: transparent; border-style: dashed; color: var(--muted); font-size: .85rem; border-radius: 12px; }
.chat-msg--system time { display: block; font-size: .72rem; margin-top: 4px; }
.chat-msg.is-new .chat-bubble { animation: chatIn .35s ease-out; }
@keyframes chatIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.chat-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chat-img img { display: block; max-width: 220px; max-height: 220px; border-radius: 10px; border: 1px solid var(--line2); object-fit: cover; cursor: zoom-in; }
.chat-file { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--s1); color: inherit; text-decoration: none; max-width: 260px; }
.chat-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; } .chat-file small { grid-column: 2; color: var(--muted); font-size: .72rem; }
.chat-composer { position: sticky; bottom: 0; z-index: 2; display: grid; gap: 8px; padding: 10px; border-radius: 16px; border: 1px solid var(--line2); background: color-mix(in srgb, var(--s1) 92%, transparent); backdrop-filter: blur(8px); }
.chat-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.chat-row textarea { resize: none; min-height: 42px; max-height: 200px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg); color: var(--fg); font: inherit; line-height: 1.4; }
.chat-row textarea:focus { outline: none; border-color: var(--accent); }
.chat-attach { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line2); background: var(--s2); color: var(--accent); cursor: pointer; }
.chat-attach:hover { background: var(--s3); }
.chat-send { width: 46px; height: 42px; padding: 0; justify-content: center; }
.chat-send.is-busy { opacity: .6; }
.chat-previews { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-prev { position: relative; display: grid; gap: 2px; width: 92px; }
.chat-prev img, .chat-prev__doc { width: 92px; height: 70px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line2); }
.chat-prev__doc { display: grid; place-items: center; background: var(--s2); font: 700 .8rem/1 var(--mono); color: var(--fg2); }
.chat-prev small { font-size: .68rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-prev__x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line2); background: var(--s1); color: var(--fg); cursor: pointer; line-height: 1; }
.chat-opts { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.chat-hint { margin: 0; } .chat-warn { margin: 0; }
.chat-zoom { padding: 0; border: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.chat-zoom::backdrop { background: rgba(4,6,8,.85); }
.chat-zoom img { display: block; max-width: 94vw; max-height: 90vh; border-radius: 12px; }
.chat-zoom .ax-modal__x { position: absolute; top: 8px; right: 8px; }
@media (max-width: 640px) { .chat-bubble { max-width: 90%; } .chat-img img { max-width: 160px; max-height: 160px; } }
.ax-drop { display: grid; gap: 2px; justify-items: center; text-align: center; padding: 18px 14px; border: 2px dashed var(--line2); border-radius: 14px; background: var(--s1); cursor: pointer; transition: border-color .2s, background .2s; }
.ax-drop:hover, .ax-drop:focus-visible, .ax-drop.is-over { border-color: var(--accent); background: rgba(140,198,63,.07); outline: none; }
.ax-drop span { color: var(--muted); font-size: .85rem; }
.ax-drop__list { list-style: none; margin: 6px 0 0; padding: 0; font-size: .8rem; color: var(--fg2); }
.chat-dropmsg { display: none; }
.chat.is-drop .chat-dropmsg { display: grid; place-items: center; position: absolute; inset: 0; z-index: 5; border-radius: 16px; background: rgba(140,198,63,.12); border: 2px dashed var(--accent); color: var(--fg); font-weight: 600; font-size: 1.1rem; pointer-events: none; backdrop-filter: blur(2px); }

/* Portal request header (/cuenta/soporte/{id}) */
.tk-head { display: block; margin-bottom: 14px; }
.tk-head__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 6px 0 10px; }
.tk-head__title h1 { margin: 0; }
.tk-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tk-meta li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line2); border-radius: 999px; background: var(--s1); font-size: .82rem; }
.tk-meta li > span { color: var(--muted); } .tk-meta li b { font-weight: 600; color: var(--fg); }
.tk-meta .i { color: var(--accent); }
.tk-meta__sep { margin: 0 2px; }
/* Juancho's space (owner rule 2026-10-05): when the assistant mascot is on the page (fixed bottom-right, ~128 px
   wide), the whole content leaves that strip free instead of sliding under it. Phones: the bottom strip. */
@media (min-width: 900px) { body:has(.jc) .ax-main { padding-right: 140px; } }
@media (max-width: 899px) { body:has(.jc) .ax-main { padding-bottom: 150px; } }


/* CRM > cliente > Antenas asignadas */
.ax-card__acts { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.ant-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ant-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 12px; background: var(--s2); }
.ant-item__main { display: grid; gap: 4px; min-width: 0; }
.ant-item__main small { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.ant-pick { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
.ant-opt { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1px solid var(--line2); border-radius: 10px; cursor: pointer; background: var(--s2); }
.ant-opt:hover { border-color: var(--accent); }
.ant-opt:has(input:checked) { border-color: var(--accent); background: rgba(140,198,63,.10); }
.ant-opt input { margin-top: 3px; accent-color: var(--accent); }
.ant-opt span { display: grid; gap: 3px; min-width: 0; } .ant-opt small { color: var(--muted); font-size: .78rem; }
.ant-use { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; } .ant-use legend { font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
[data-ant-assign] input[type=search] { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg); color: var(--fg); font: inherit; }
.ant-end { align-items: flex-start; } .ant-end span { line-height: 1.4; }
#antAssign { width: min(760px, calc(100vw - 24px)); }
#antAssign form { max-height: calc(100dvh - 40px); overflow-y: auto; }

/* Searchable select (select[data-search], app.js) */
.sx { position: relative; }
.sx-native { position: absolute; inset: auto 0 0 0; width: 100%; height: 1px; opacity: 0; pointer-events: none; }
.sx-btn { width: 100%; min-height: 42px; padding: 9px 34px 9px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg); color: var(--fg); font: inherit; text-align: left; cursor: pointer; position: relative; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-btn::after { content: ''; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: translateY(-70%) rotate(45deg); }
.sx-btn.is-empty { color: var(--muted); } .sx-btn.is-invalid { border-color: var(--bad); }
.sx.is-open .sx-btn, .sx-btn:focus-visible { border-color: var(--accent); outline: none; }
.sx-panel { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); min-width: 280px; padding: 8px; border: 1px solid var(--line2); border-radius: 12px; background: var(--s1); box-shadow: 0 24px 50px -16px rgba(0,0,0,.7); }
.sx-q { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line2); background: var(--bg); color: var(--fg); font: inherit; margin-bottom: 6px; }
.sx-q:focus { outline: none; border-color: var(--accent); }
.sx-list { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 2px; }
.sx-group { padding: 8px 8px 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sx-opt { display: grid; gap: 2px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.sx-opt b { font-weight: 500; font-family: var(--mono); font-size: .86rem; } .sx-opt small { color: var(--muted); font-size: .74rem; }
.sx-opt:hover, .sx-opt.is-active { background: var(--s2); }
.sx-opt[aria-selected=true] { background: rgba(140,198,63,.12); } .sx-opt[aria-selected=true] b { color: var(--accent); }
.sx-empty { margin: 6px 8px; color: var(--muted); font-size: .85rem; }
/* Inside a modal the picker panel opens in the flow (a floating panel would be clipped by the dialog edge). */
dialog .sx-panel { position: static; margin-top: 6px; box-shadow: none; min-width: 0; }
dialog .sx-list { max-height: 240px; }
.ax-modal > form { max-height: calc(100dvh - 40px); overflow-y: auto; }
.ant-when { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; } .ant-when legend { font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.ant-when__opt { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 10px; background: var(--s2); }
.ant-when__opt:has(input[name=when]:checked) { border-color: var(--accent); }
.ant-when__opt p { margin: 0 0 0 26px; font-size: .84rem; color: var(--fg2); line-height: 1.45; } .ant-when__opt > .ax-check:last-child:not(:first-child) { margin-left: 26px; font-size: .84rem; }
[data-retire-inv]:empty { display: none; } [data-retire-inv] { margin: 0; padding: 8px 10px; border-radius: 8px; background: rgba(127,127,127,.10); }
.ant-ends { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }

/* Juancho above maps (Leaflet panes/controls go up to z-index 1000) in the CRM and the portal. */
body .jc { z-index: 1200; }
.ax-sup-ai--first { margin-bottom: 16px; border-color: rgba(140,198,63,.35); background: linear-gradient(120deg, rgba(140,198,63,.08), transparent 60%), var(--s1); }
@media (max-width: 640px) { .ax-sup-ai { flex-direction: column; align-items: flex-start; } }
.ant-item__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 2px; }
.ax-kpi__sub { display: block; margin-top: 6px; font-size: .8rem; color: var(--muted); text-decoration: none; }
.ax-kpi__sub b { font-size: inherit; color: var(--fg2); } .ax-kpi__sub.is-on, .ax-kpi__sub.is-on b { color: var(--warn); }
.ax-kpi__sub:hover { color: var(--accent); }

