/* Carclass Core v2 · estilo de navegación tipo Asisma, verde Rolex y dorado */
:root {
  --brand: #006039; --brand-600: #004f2f; --brand-700: #003d24; --brand-050: #e8f3ee; --brand-100: #cfe6db;
  --gold: #A37E2C; --gold-050: #f7f1e4;
  --bg: #f4f6f5; --surface: #ffffff; --surface-2: #f8faf9; --border: #e3e8e5; --border-2: #d3dbd6;
  --fg: #14201b; --muted: #5b6a63; --faint: #8b9892;
  --ok: #1a7f4b; --ok-bg: #e5f4ec; --warn: #9a6a00; --warn-bg: #fbf2dc; --bad: #c0362c; --bad-bg: #fbe9e7; --info: #2563a8; --info-bg: #e7eff9;
  --u-blackgps: #1d2a24; --u-somosb2b: #5b4fb3; --u-carclass: #006039; --u-carwash: #2a86b8; --u-nom: #A37E2C; --u-grupo: #6b7a73;
  --shadow: 0 1px 2px rgba(16,32,24,.05), 0 1px 3px rgba(16,32,24,.06);
  --shadow-lg: 0 12px 40px rgba(16,32,24,.18);
  --r: 12px; --r-sm: 8px;
  --side-w: 256px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #1f8a5c; --brand-600: #24a06b; --brand-700: #0f5a3a; --brand-050: #12261e; --brand-100: #1a3a2c;
  --gold: #c9a24f; --gold-050: #2a2416;
  --bg: #0c1310; --surface: #121b17; --surface-2: #17221d; --border: #22302a; --border-2: #2c3d35;
  --fg: #e5ece8; --muted: #9aaba3; --faint: #6c7d75;
  --ok: #4cc58a; --ok-bg: #10291d; --warn: #e0b24a; --warn-bg: #2b2412; --bad: #f0786c; --bad-bg: #2e1513; --info: #7fb0ea; --info-bg: #142336;
  --u-blackgps: #c7d2cc; --u-carclass: #2fae74; --u-nom: #c9a24f;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 16px 48px rgba(0,0,0,.5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
button { font: inherit; color: inherit; }
.num, .mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- botones e inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--border-2); background: var(--surface); color: var(--fg); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: var(--surface-2); border-color: var(--faint); }
.btn:focus-visible, .input:focus-visible, .chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: var(--r-sm); background: var(--surface); color: var(--fg); font: inherit; }
textarea.input { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; }
select.input { padding-right: 28px; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); outline: none; }
.field { display: grid; gap: 6px; flex: 1 1 200px; min-width: 0; }
.field > label, .lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.err { color: var(--bad); font-size: 13px; min-height: 0; }
.err:empty { display: none; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.check-row input { width: 16px; height: 16px; accent-color: var(--brand); }

/* ---------- login ---------- */
.login { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; color: #eef3ef; overflow: hidden; isolation: isolate; background: #03110b; }
.login-scene { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 620px at 12% 8%, rgba(16,140,88,.55), transparent 62%),
    radial-gradient(760px 520px at 92% 96%, rgba(163,126,44,.30), transparent 62%),
    radial-gradient(600px 420px at 70% 20%, rgba(0,96,57,.35), transparent 70%),
    linear-gradient(160deg, #04170f 0%, #062a1b 45%, #020906 100%); }
.login-scene .grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 46px 46px; -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%); }
.login-scene .ring { position: absolute; border-radius: 50%; border: 1px solid rgba(233,207,143,.16); }
.login-scene .r1 { width: 620px; height: 620px; right: -220px; top: -200px; box-shadow: 0 0 0 70px rgba(255,255,255,.015), 0 0 0 140px rgba(255,255,255,.012); }
.login-scene .r2 { width: 380px; height: 380px; left: -140px; bottom: -150px; border-color: rgba(16,140,88,.25); }
.login-scene .beam { position: absolute; top: -30%; left: -40%; width: 60%; height: 160%; background: linear-gradient(90deg, transparent, rgba(233,207,143,.07), transparent); transform: rotate(18deg); animation: login-beam 9s ease-in-out infinite; }
@keyframes login-beam { 0%, 100% { transform: translateX(0) rotate(18deg); opacity: .6; } 50% { transform: translateX(160%) rotate(18deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .login-scene .beam { animation: none; } }

.login-brand { position: relative; padding: 52px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login-brand .logo-row { display: flex; align-items: center; gap: 14px; }
.logo-disc { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.logo-disc img { width: 100%; height: 100%; object-fit: contain; }
.login-brand .logo-row b { font-size: 18px; display: block; letter-spacing: -.01em; }
.login-brand .logo-row small { opacity: .7; font-size: 12.5px; }
.login-brand h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; max-width: 15ch; letter-spacing: -.03em; font-weight: 800; }
.login-brand h1 em { font-style: normal; background: linear-gradient(90deg, #f3dc9f, #c9a24e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-brand p.lead { opacity: .78; max-width: 44ch; margin: 16px 0 0; padding: 0; text-indent: 0; font-size: 15.5px; line-height: 1.6; }
.benefits { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; }
.benefits li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; }
.benefits .ck { width: 26px; height: 26px; border-radius: 50%; background: rgba(233,207,143,.12); border: 1px solid rgba(233,207,143,.35); display: grid; place-items: center; flex: none; color: #e9cf8f; }
.benefits b { display: block; }
.benefits span.s { opacity: .65; font-size: 13px; }
.login-brand .foot { font-size: 12px; opacity: .5; }

.login-form { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 420px; display: grid; gap: 18px; padding: 36px 32px 28px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(10,32,23,.78), rgba(5,18,12,.72)); border: 1px solid rgba(233,207,143,.22);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 40px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03) inset, 0 1px 0 rgba(255,255,255,.07) inset; }
.login-head { display: grid; justify-items: center; gap: 10px; text-align: center; margin-bottom: 4px; }
.login-head .logo-disc { width: 86px; height: 86px; box-shadow: 0 0 0 2px rgba(233,207,143,.7), 0 0 0 7px rgba(233,207,143,.1), 0 0 46px rgba(233,207,143,.35), 0 0 90px rgba(16,140,88,.55); }
.login-head .name { font-size: 22px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-top: 8px; }
.login-head .tag { font-size: 13px; opacity: .65; }
.login-head .bar { width: 34px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #c9a24e, #f3dc9f); margin: 2px 0 4px; }
.login-card h2 { font-size: 24px; text-align: center; letter-spacing: -.01em; }
.login-card .sub { color: rgba(238,243,239,.65); margin-top: -12px; text-align: center; }
.login-card .field > label { color: rgba(238,243,239,.8); font-size: 13px; }
.login-card .input { height: 50px; border-radius: 13px; background: rgba(0,0,0,.32); border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 15px; transition: border-color .15s, box-shadow .15s, background .15s; }
.login-card .input::placeholder { color: rgba(255,255,255,.35); }
.login-card .input:focus { outline: none; border-color: #e9cf8f; background: rgba(0,0,0,.42); box-shadow: 0 0 0 4px rgba(233,207,143,.18); }
.login-card .input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #0b2219 inset; caret-color: #fff; }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 52px; }
.pass-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.login-card .pass-wrap button { color: rgba(255,255,255,.8); width: 38px; height: 38px; border-radius: 10px; }
.login-card .pass-wrap button:hover { background: rgba(255,255,255,.08); }
.login-opts { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.login-card .check-row { color: rgba(238,243,239,.8); }
.login-card .check-row input { accent-color: #a37e2c; }
.login-opts a { font-size: 13px; font-weight: 600; color: #e9cf8f; text-decoration: none; border-bottom: 1px solid rgba(233,207,143,.45); }
.login-card .btn.primary { height: 52px; border-radius: 13px; font-size: 15.5px; font-weight: 700; letter-spacing: .01em; border: 0; color: #fff;
  background: linear-gradient(135deg, #12a066 0%, #006039 55%, #004327 100%); box-shadow: 0 14px 34px rgba(0,96,57,.5), 0 1px 0 rgba(255,255,255,.18) inset; transition: transform .12s, filter .12s; }
.login-card .btn.primary:hover { filter: brightness(1.08); }
.login-card .btn.primary:active { transform: translateY(1px); }
.login-card .err { color: #ffb4a8; text-align: center; }
.login-note { font-size: 12px; color: rgba(238,243,239,.45); text-align: center; letter-spacing: .02em; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 30; }
.side-top { padding: 18px 16px 12px; display: grid; gap: 14px; border-bottom: 1px solid var(--border); }
.side .brand { display: flex; align-items: center; gap: 10px; }
.side .brand .logo-disc { width: 40px; height: 40px; border: 1px solid var(--border); box-shadow: none; }
.side .brand b { display: block; font-size: 15px; }
.side .brand small { color: var(--muted); font-size: 12px; }
.btn.notify { width: 100%; height: 36px; font-size: 12.5px; background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.notify.on { background: var(--brand-050); color: var(--brand); border-color: var(--brand-100); }
.nav { flex: 1; overflow-y: auto; padding: 8px 10px 16px; }
.nav h6 { margin: 16px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; font-variant: small-caps; color: var(--faint); }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--muted); font-weight: 600; font-size: 13.5px; text-decoration: none; position: relative; }
.nav a:hover { background: var(--surface-2); color: var(--fg); }
.nav a.on { background: var(--brand-050); color: var(--brand); }
.nav a.on::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav a .badge { margin-left: auto; }
.nav a .soon { margin-left: auto; font-size: 10px; font-weight: 700; color: var(--gold); background: var(--gold-050); padding: 1px 6px; border-radius: 99px; }
.side-foot { border-top: 1px solid var(--border); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none; }
.who { flex: 1; min-width: 0; line-height: 1.25; }
.who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who span { font-size: 12px; color: var(--muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.scrim { display: none; }
.top { position: sticky; top: 0; z-index: 20; height: 64px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 24px; }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; overflow: hidden; }
.crumbs .org { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.crumbs .sep { color: var(--faint); }
.crumbs b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; }
.top .search { position: relative; width: min(280px, 30vw); }
.top .search .input { height: 38px; padding-left: 36px; background: var(--surface-2); }
.top .search svg { position: absolute; left: 12px; top: 11px; color: var(--faint); }
.bell { position: relative; }
.bell .dot { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.menu-btn { display: none; }
.page { padding: 24px; max-width: 1440px; width: 100%; margin: 0 auto; display: grid; gap: 20px; align-content: start; }
.page > * { min-width: 0; }
.page > div[id] { display: grid; gap: 20px; align-content: start; }
.side-top .btn { width: 100%; min-width: 0; }
.side-top { min-width: 0; }
.btn.notify { white-space: normal; height: auto; min-height: 36px; padding: 8px 10px; line-height: 1.25; font-size: 12px; }
.grid-main > *, .grid2 > *, .stack > *, .card-b > * { min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-h h3 { font-size: 14.5px; }
.card-h .r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 18px; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); display: grid; gap: 4px; justify-items: center; }
.empty b { color: var(--fg); font-size: 14.5px; }
.empty .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-050); color: var(--brand); display: grid; place-items: center; margin-bottom: 6px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; align-content: start; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; display: grid; gap: 6px; box-shadow: var(--shadow); position: relative; color: inherit; text-decoration: none !important; }
a.kpi:hover { border-color: var(--brand-100); }
.kpi .top-row { display: flex; align-items: center; justify-content: space-between; }
.kpi .l { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi .ki { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-050); color: var(--brand); display: grid; place-items: center; }
.kpi .ki.gold { background: var(--gold-050); color: var(--gold); }
.kpi .v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .s { font-size: 12.5px; color: var(--muted); }
.kpi .v.bad { color: var(--bad); } .kpi .v.warn { color: var(--warn); }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.pill.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.pill.gold { background: var(--gold-050); color: var(--gold); border-color: transparent; }
.pill.u { background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); border-color: transparent; }
.pill.u::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge.bad { background: var(--bad); color: #fff; border-color: transparent; }
.badge.brand { background: var(--brand); color: #fff; border-color: transparent; }
.badge:empty { display: none; }

/* filtros */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 32px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--border-2); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; }
.chip:hover { color: var(--fg); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.daterange { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 0 8px; height: 38px; }
.daterange input { border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 13px; height: 34px; }
.daterange input:focus { outline: none; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button, .tabs a { background: none; border: 0; padding: 10px 14px; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tabs .on { color: var(--brand); border-bottom-color: var(--brand); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }

/* barras */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr) 64px; gap: 12px; align-items: center; font-size: 13px; color: inherit; text-decoration: none !important; }
.bar-row .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 99px; background: var(--brand); min-width: 3px; }
.bar-row .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 6px; vertical-align: -1px; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--faint); font-family: inherit; }
.chart .grid { stroke: var(--border); }
.sla { display: grid; gap: 8px; }
.sla-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }

/* tablas */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface-2); }
.tbl .name { font-weight: 600; }
.tbl .sub { font-size: 12px; color: var(--muted); }
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.pager span { margin-right: auto; }

/* bandeja */
.inbox { display: grid; gap: 12px; }
.lead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 18px; }
.lead + .lead { border-top: 1px solid var(--border); }
.clock { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; text-align: center; line-height: 1; background: var(--ok-bg); color: var(--ok); }
.clock b { font-size: 20px; display: block; }
.clock small { font-size: 10.5px; font-weight: 600; }
.clock.warn { background: var(--warn-bg); color: var(--warn); }
.clock.bad { background: var(--bad-bg); color: var(--bad); animation: pulse 2s infinite; }
.clock.done { background: var(--surface-2); color: var(--muted); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 15%, transparent); } }
.lead .t { font-weight: 700; font-size: 14.5px; }
.lead .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.lead .msg { margin-top: 8px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; border: 1px solid var(--border); font-size: 13px; }
.lead .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(272px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); display: flex; flex-direction: column; max-height: calc(100vh - 260px); min-height: 200px; }
.col-h { padding: 12px 14px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); }
.col-h b { font-size: 13px; }
.col-h .m { margin-left: auto; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.col-b { padding: 10px; display: grid; gap: 8px; overflow-y: auto; align-content: start; flex: 1; }
.col.drop { outline: 2px dashed var(--brand); outline-offset: -2px; background: var(--brand-050); }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; cursor: grab; box-shadow: var(--shadow); display: grid; gap: 6px; }
.kcard:hover { border-color: var(--brand-100); }
.kcard.drag { opacity: .45; }
.kcard { min-width: 0; }
.kcard b { font-size: 13px; overflow-wrap: anywhere; }
.kcard .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: var(--muted); }
.kcard .next { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.kcard .next span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-more { font-size: 12px; color: var(--faint); text-align: center; padding: 6px; }
.dropbar { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dropzone { border: 2px dashed var(--border-2); border-radius: var(--r); padding: 14px; text-align: center; font-weight: 700; font-size: 13px; color: var(--muted); }
.dropzone.win.drop { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.dropzone.lose.drop { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }

/* ficha */
.ficha-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.ficha-head .av { width: 56px; height: 56px; border-radius: 16px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 19px; flex: none; }
.ficha-head .info { flex: 1; min-width: 240px; }
.ficha-head h1 { font-size: 24px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.opp { border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: grid; gap: 10px; }
.opp-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.steps { display: flex; gap: 4px; }
.steps i { flex: 1; height: 6px; border-radius: 99px; background: var(--border); }
.steps i.done { background: var(--c, var(--brand)); }
.steps-lab { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.composer { display: grid; gap: 10px; }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 10px 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 15px; top: 40px; bottom: -10px; width: 1px; background: var(--border); }
.tl:last-child::before { display: none; }
.tl .ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-050); color: var(--brand); }
.tl.sys .ic { background: var(--surface-2); color: var(--faint); }
.tl .t { font-size: 13px; }
.tl .d { font-size: 11.5px; color: var(--faint); margin-top: 2px; }

/* agenda */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal .dow { padding: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal .day { min-height: 112px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: grid; gap: 3px; align-content: start; min-width: 0; }
.cal .day.out { background: var(--surface-2); }
.cal .day.out .n { color: var(--faint); }
.cal .day .n { font-size: 12px; font-weight: 700; color: var(--fg); text-decoration: none; justify-self: start; }
.cal .day.today .n { background: var(--brand); color: #fff; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.ev { display: block; font-size: 11.5px; padding: 3px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c, var(--brand)) 12%, transparent); color: var(--fg); border-left: 3px solid var(--c, var(--brand)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none !important; }
.ev.tarea { --c: var(--gold); }
.ev.past { opacity: .75; }
.cal.week .day { min-height: 340px; }
.dayview { display: grid; gap: 8px; }
.dayview .ev { white-space: normal; padding: 10px 12px; font-size: 13px; }
.sug { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 16px; }
.sug + .sug { border-top: 1px solid var(--border); }
.sug .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-050); color: var(--gold); }

/* tareas */
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 12px 18px; align-items: start; }
.task + .task { border-top: 1px solid var(--border); }
.check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border-2); background: var(--surface); cursor: pointer; display: grid; place-items: center; color: #fff; margin-top: 1px; }
.check:hover { border-color: var(--brand); }
.task.hecha .check { background: var(--brand); border-color: var(--brand); }
.task.hecha .t { text-decoration: line-through; color: var(--faint); }

/* notificaciones */
.notif { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; padding: 14px 18px; align-items: start; color: inherit; text-decoration: none !important; }
.notif + .notif { border-top: 1px solid var(--border); }
.notif:hover { background: var(--surface-2); }
.notif .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-050); color: var(--brand); }
.notif .ic.bad { background: var(--bad-bg); color: var(--bad); }
.notif .ic.warn { background: var(--warn-bg); color: var(--warn); }
.notif.unread .t { font-weight: 700; }
.notif.unread::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 6px; }
.notif .d { font-size: 12px; color: var(--faint); }

/* aviso */
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--warn-bg); color: var(--fg); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); font-size: 13px; }
.alert svg { color: var(--warn); flex: none; margin-top: 1px; }
.alert.info { background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert.info svg { color: var(--info); }
.alert.brand { background: var(--brand-050); border-color: var(--brand-100); }
.alert.brand svg { color: var(--brand); }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(8,20,14,.48); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 580px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.modal.wide { max-width: 760px; }
.modal-h { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-h h3 { flex: 1; font-size: 16px; }
.modal form { display: flex; flex-direction: column; min-height: 0; }
.modal-b { padding: 20px; display: grid; gap: 14px; overflow-y: auto; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.onb { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 10px 6px; }
.onb .big { width: 64px; height: 64px; border-radius: 18px; background: var(--brand-050); color: var(--brand); display: grid; place-items: center; }
.onb h4 { font-size: 19px; }
.onb p { margin: 0; color: var(--muted); max-width: 46ch; }
.dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--border-2); transition: width .2s; }
.dots i.on { width: 22px; background: var(--brand); }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--fg); color: var(--surface); padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 13.5px; z-index: 200; transition: .2s; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); color: #fff; }
.skel { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.proc { white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; }
.proc h4 { margin: 0 0 8px; }
.perm td, .perm th { text-align: center; }
.perm td:first-child, .perm th:first-child { text-align: left; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .grid-main, .grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-form { padding: 28px 18px; }
  .login-card { padding: 30px 22px 22px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 86vw); transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }
  .side.open + .scrim { display: block; }
  .menu-btn { display: inline-flex; }
  .top { padding: 0 12px; gap: 6px; }
  .top .search { display: none; }
  .top .nl span { display: none; }
  .top .nl { width: 38px; padding: 0; }
  .crumbs .org, .crumbs .sep { display: none; }
  .page { padding: 16px; }
  .lead { grid-template-columns: auto minmax(0, 1fr); }
  .lead .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .cal .day { min-height: 74px; }
  .ev { font-size: 10.5px; padding: 2px 4px; }
  .bar-row { grid-template-columns: 96px minmax(0, 1fr) 44px; }
  .kanban { grid-auto-columns: 82vw; }
}

/* ---------- v2.1 · líneas de negocio ---------- */
:root { --u-blackgps: #9A7300; --u-nom: #4A5058; --u-carwash: #1F7FB0; --lc: var(--brand); }
:root[data-theme="dark"] { --u-blackgps: #FFD54A; --u-nom: #B4BCC6; --u-carwash: #5BB4E5; }
:root[data-linea="carclass"] { --lc: var(--u-carclass); }
:root[data-linea="nom"] { --lc: var(--u-nom); }
:root[data-linea="carwash"] { --lc: var(--u-carwash); }
:root[data-linea="blackgps"] { --lc: var(--u-blackgps); }
:root[data-linea]:not([data-linea="grupo"]) .top { box-shadow: inset 0 -3px 0 var(--lc); }
.linea-pick { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px; border: 1px solid var(--border-2); border-radius: 99px; background: var(--surface); flex: none; }
.linea-pick select { border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 13px; color: var(--fg); height: 34px; cursor: pointer; }
.linea-pick select:focus { outline: none; }
.linea-pick:focus-within { border-color: var(--lc); }
.ldot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--lc)); flex: none; }
.linea-pick .ldot { background: var(--lc); }
.ltabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ltabs button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.ltabs button:hover { color: var(--fg); }
.ltabs button.on { border-color: var(--c); color: var(--fg); box-shadow: inset 0 -3px 0 var(--c); }
.ucards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.ucard { display: grid; gap: 14px; align-content: start; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--c); border-radius: var(--r); padding: 16px 18px; color: inherit; text-decoration: none !important; box-shadow: var(--shadow); min-width: 0; }
.ucard:hover { border-color: var(--c); }
.uc-h { display: flex; gap: 10px; align-items: center; }
.uc-h b { display: block; font-size: 15.5px; }
.uc-h .faint { font-size: 12px; }
.uc-h .go { margin-left: auto; color: var(--faint); }
.uc-h .ldot { width: 12px; height: 12px; background: var(--c); }
.ucard .meta-t i { background: var(--c); }
.minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.mini { display: grid; gap: 1px; min-width: 0; }
.mini .l { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.mini b { font-size: 18px; font-variant-numeric: tabular-nums; }
.mini .s { font-size: 11.5px; color: var(--faint); }
.uc-al { display: grid; gap: 6px; font-size: 12.5px; border-top: 1px solid var(--border); padding-top: 10px; }
.uc-al > div { display: flex; gap: 8px; align-items: flex-start; }
.uc-al svg { color: var(--warn); flex: none; margin-top: 2px; }
.uc-al.ok { display: flex; gap: 8px; color: var(--muted); }
.uc-al.ok svg { color: var(--ok); }
.meta { display: grid; gap: 5px; min-width: 0; }
.meta-k { font-size: 12px; font-weight: 600; color: var(--muted); }
.meta-l { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.meta-t { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.meta-t i { display: block; height: 100%; background: var(--c, var(--lc)); border-radius: 99px; min-width: 2px; }
.ok-t { color: var(--ok); font-weight: 700; }
.bad-t { color: var(--bad); font-weight: 700; }
.uband { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 10%, var(--surface)), var(--surface) 70%); border: 1px solid var(--border); border-left: 5px solid var(--c); border-radius: var(--r); padding: 16px 20px; }
.ub-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 28px; }
h2.sec { font-size: 15px; margin: 10px 0 -6px; }
h2.sec .faint { font-weight: 500; font-size: 13px; }
.funnel { display: grid; gap: 8px; }
.fstep { display: grid; grid-template-columns: 22px minmax(110px, 170px) minmax(0, 1fr) 50px; gap: 10px; align-items: center; font-size: 13px; }
.fi { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.fstep .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.fstep .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fstep .bar-track i { background: var(--lc); }
.pick { display: grid; gap: 2px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; margin-bottom: 6px; }
.pick:hover { border-color: var(--brand); }
.input.sm { height: 32px; font-size: 13px; padding: 0 8px; }
.qtbl td { vertical-align: middle; padding: 8px 10px; }
.qtbl tfoot td { border-bottom: 0; padding-top: 12px; }
.xbox { display: grid; gap: 10px; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.hint { font-size: 12px; color: var(--muted); }

/* documento de cotización (pantalla, link público y PDF) */
.qdoc { background: #fff; color: #14201b; max-width: 820px; width: 100%; margin: 0 auto; border-radius: 14px; border: 1px solid #e3e8e5; box-shadow: var(--shadow); padding: 40px 44px; display: grid; gap: 24px; border-top: 6px solid var(--c); }
.qdoc .logo-disc { border: 1px solid #e3e8e5; }
.qd-h { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.qd-brand { display: flex; gap: 12px; align-items: center; }
.qd-brand b { display: block; font-size: 20px; }
.qd-brand small { color: #5b6a63; }
.qd-meta { display: grid; text-align: right; gap: 2px; font-size: 13px; color: #5b6a63; }
.qd-meta b { color: #14201b; font-size: 15px; }
.qd-cli { display: flex; gap: 32px; flex-wrap: wrap; padding: 14px 16px; background: #f4f6f5; border-radius: 10px; }
.qd-cli .lbl { display: block; color: #5b6a63; }
.qd-items { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.qd-items th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: #5b6a63; border-bottom: 2px solid #14201b; padding: 8px 6px; }
.qd-items td { padding: 12px 6px; border-bottom: 1px solid #e3e8e5; vertical-align: top; }
.qd-items .num { text-align: right; white-space: nowrap; }
.qd-items .sub { font-size: 12px; color: #5b6a63; }
.qd-tot { justify-self: end; min-width: 280px; display: grid; gap: 6px; font-size: 13.5px; }
.qd-tot div { display: flex; justify-content: space-between; gap: 20px; }
.qd-tot .big { font-size: 20px; font-weight: 800; border-top: 2px solid #14201b; padding-top: 8px; }
.qd-notas h4 { margin: 0 0 6px; font-size: 13px; }
.qd-notas p { margin: 0; font-size: 12.5px; color: #3a4741; white-space: pre-wrap; }
.qd-f { font-size: 11.5px; color: #8b9892; border-top: 1px solid #e3e8e5; padding-top: 12px; text-align: center; }
.pub { min-height: 100vh; background: #eef1ef; padding: 24px 16px; display: grid; gap: 16px; align-content: start; --u-carclass: #006039; --u-carwash: #1F7FB0; --u-nom: #4A5058; --u-blackgps: #9A7300; }
.pub-bar { max-width: 820px; width: 100%; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: #14201b; }
.pub-cta { max-width: 820px; width: 100%; margin: 0 auto; text-align: center; display: grid; gap: 10px; justify-items: center; color: #3a4741; }
.pub-cta p { margin: 0; }
@media print {
  body { background: #fff !important; }
  .side, .top, .scrim, .no-print, #toast, .pub-bar, .pub-cta, #modal-root { display: none !important; }
  .shell, .main, .page, .pub { display: block !important; padding: 0 !important; margin: 0 !important; background: #fff !important; max-width: none !important; }
  .qdoc { box-shadow: none; border: 0; border-top: 6px solid var(--c); max-width: none; padding: 0; border-radius: 0; }
  @page { margin: 16mm; }
}
@media (max-width: 900px) {
  .linea-pick { padding-left: 10px; }
  .linea-pick select { max-width: 104px; }
  .qdoc { padding: 24px 18px; }
  .qd-meta { text-align: left; }
  .fstep { grid-template-columns: 22px 96px minmax(0, 1fr) 40px; }
  .minis { gap: 8px 10px; }
}

/* ---------- v2.2 · finanzas ---------- */
.eerr { font-size: 12.5px; }
.eerr th:first-child, .eerr td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 220px; }
.eerr thead th:first-child { background: var(--surface-2); }
.eerr td { padding: 8px 12px; white-space: nowrap; }
.eerr .e-sec td { background: var(--surface-2); font-weight: 800; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; color: var(--muted); padding-top: 12px; }
.eerr .e-sub td { font-weight: 700; }
.eerr .e-det td { color: var(--muted); }
.eerr .e-det td:first-child { padding-left: 32px; }
.eerr .e-tot td { font-weight: 700; border-top: 1px solid var(--border-2); }
.eerr .e-big td { font-weight: 800; font-size: 13.5px; background: var(--brand-050); border-top: 2px solid var(--brand); }
.eerr .e-big td:first-child { background: var(--brand-050); }
.eerr .e-pct td { color: var(--muted); font-style: italic; }
.eerr .neg { color: var(--bad); }
.eerr .ldot { display: inline-block; width: 8px; height: 8px; margin-right: 4px; }
@media print { .eerr-card, .card { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; } .kpis { grid-template-columns: repeat(4, 1fr) !important; } .tbl-wrap { overflow: visible !important; max-height: none !important; } .eerr td, .eerr th { font-size: 9.5px; padding: 4px 6px; } body { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* v2.5 · inspecciones IPC */
.tbl.click tbody tr { cursor: pointer; }
.tbl.click tbody tr:hover, .tbl.click tbody tr:focus { background: var(--surface-2); outline: none; }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 16px; font-size: 13.5px; }
.ins-capa { border: 1px solid var(--border); border-radius: var(--r-sm); margin-bottom: 8px; }
.ins-capa summary { padding: 10px 12px; cursor: pointer; }
.ins-capa .tbl { margin: 0; }
.solo-obs .ins-ok { display: none; }
.ins-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.ins-gal figure { margin: 0; }
.ins-gal img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--border); display: block; }
.ins-gal figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (max-width: 640px) { #ins-q { width: 100% !important; } .ins-capa td { width: auto !important; padding-left: 6px; padding-right: 6px; } }
/* v2.5.2 · modales que no se salen de la pantalla en el celular, y botón «Mover» del embudo */
.modal form, .modal-b > * { min-width: 0; }
.modal-b { grid-template-columns: minmax(0, 1fr); }
.kcard .kmove { margin-left: auto; height: 24px; padding: 0 8px; font-size: 11.5px; flex: none; }
.qtot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 4px 16px; font-size: 13px; padding: 4px 10px 0; }
.mover-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
@media (max-width: 640px) {
  .modal-bg { padding: 8px; }
  .modal { max-height: calc(100dvh - 16px); }
  .modal-h, .modal-b, .modal-f { padding-left: 14px; padding-right: 14px; }
  .modal-f { flex-wrap: wrap; }
  .modal-f .btn { flex: 1 1 auto; }
  .qtbl thead th:nth-child(4), .qtbl tbody td:nth-child(4) { display: none; }
  .qtbl tbody td:first-child { min-width: 110px; }
  .qtbl td { padding-left: 4px !important; padding-right: 4px !important; }
  .qtbl input[data-f="cantidad"] { width: 46px !important; }
  .qtbl input[data-f="precio"] { width: 92px !important; }
}
/* v2.6.0 · Conversaciones de WhatsApp */
/* chat: ver bloque «Conversaciones 2.10» al final */
/* v2.8.3 · playbook comercial en Ayuda */
details.pb { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: var(--surface); }
details.pb > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
/* v2.9 · tasador NOM */
.tz-tbl td { vertical-align: top; }
.tz-tbl .input.sm { height: 30px; font-size: 12px; padding: 0 8px; }
.tz-off { opacity: .62; }
.tz-off:hover { opacity: 1; }
@media print { .nomr-pg { page: nomr; } }
@page nomr { size: A4; margin: 0; }
/* ===== Refresh 2.9 · estética alineada al login (verde profundo + dorado) ===== */
:root { --r: 16px; --r-sm: 10px; --gold-2: #C9A24F; --gold-hi: #e9cf8f;
  --bg: #f1f4f2;
  --shadow: 0 1px 2px rgba(16,32,24,.04), 0 4px 14px -6px rgba(16,32,24,.10);
  --shadow-hover: 0 2px 4px rgba(16,32,24,.05), 0 14px 32px -12px rgba(0,61,36,.28);
  --side-bg: linear-gradient(185deg, #0a3a26 0%, #06281a 55%, #041c12 100%); }
:root[data-theme="dark"] { --bg: #08100c; --surface: #0f1914; --surface-2: #14201a; --border: #1d2b24; --border-2: #283a31;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-hover: 0 0 0 1px rgba(233,207,143,.18), 0 18px 40px -16px rgba(0,0,0,.8);
  --side-bg: linear-gradient(185deg, #0b2a1d 0%, #06180f 60%, #030d08 100%); }
:root[data-theme="dark"] body { background: radial-gradient(1200px 600px at 85% -10%, rgba(16,140,88,.10), transparent 60%), var(--bg); background-attachment: fixed; }

/* Menú lateral: panel oscuro como la escena del login */
.side { background: var(--side-bg); border-right: 1px solid rgba(233,207,143,.12); color: #e7efe9; }
.side::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 46px 46px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 45%); mask-image: linear-gradient(180deg, #000, transparent 45%); }
.side > * { position: relative; }
.side-top { border-bottom: 1px solid rgba(255,255,255,.07); }
.side .brand .logo-disc { width: 42px; height: 42px; border: 1px solid rgba(233,207,143,.55); box-shadow: 0 0 0 4px rgba(233,207,143,.08), 0 0 22px rgba(233,207,143,.22); }
.side .brand b { color: #fff; letter-spacing: .04em; text-transform: uppercase; font-size: 13.5px; }
.side .brand small { color: var(--gold-hi); opacity: .8; letter-spacing: .02em; }
.btn.notify { background: linear-gradient(135deg, #0b7a4b, #006039 60%, #004f2f); border: 1px solid rgba(233,207,143,.35); box-shadow: 0 6px 18px -8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12); }
.btn.notify.on { background: rgba(255,255,255,.06); color: var(--gold-hi); border-color: rgba(233,207,143,.3); }
.side-top .btn.sm { background: rgba(255,255,255,.05); color: #e7efe9; border-color: rgba(255,255,255,.12); }
.nav h6 { color: rgba(233,207,143,.62); }
.nav a { color: rgba(231,239,233,.72); }
.nav a svg { opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: linear-gradient(90deg, rgba(233,207,143,.16), rgba(233,207,143,.04)); color: #fff; box-shadow: inset 0 0 0 1px rgba(233,207,143,.18); }
.nav a.on svg { color: var(--gold-hi); opacity: 1; }
.nav a.on::before { background: var(--gold-hi); box-shadow: 0 0 10px rgba(233,207,143,.7); }
.nav a .badge { background: rgba(255,255,255,.1); color: #e7efe9; border-color: transparent; }
.nav a .badge.bad { background: #d9493d; color: #fff; }
.nav { scrollbar-color: rgba(255,255,255,.15) transparent; }
.side-foot { border-top: 1px solid rgba(255,255,255,.07); background: rgba(0,0,0,.18); }
.side-foot .avatar { background: linear-gradient(135deg, #e9cf8f, #A37E2C); color: #1c1407; box-shadow: 0 0 0 2px rgba(233,207,143,.25); }
.side-foot .who b { color: #fff; } .side-foot .who span { color: rgba(233,207,143,.75); }
.side-foot .btn.ghost { color: rgba(231,239,233,.8); } .side-foot .btn.ghost:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Barra superior: vidrio con filete dorado */
.top { background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; box-shadow: 0 1px 0 var(--border), 0 1px 0 0 rgba(163,126,44,.0); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(163,126,44,.45), transparent); pointer-events: none; }
.crumbs b { font-weight: 800; letter-spacing: -.01em; }
.top .search .input { border-radius: 99px; }
.linea-pick { border-radius: 99px !important; }

/* Botones */
.btn { border-radius: var(--r-sm); transition: background .15s, border-color .15s, box-shadow .2s, transform .15s; }
.btn.primary { background: linear-gradient(135deg, #0b7a4b 0%, #006039 55%, #004a2c 100%); border-color: #005632; box-shadow: 0 6px 16px -8px rgba(0,96,57,.7), inset 0 1px 0 rgba(255,255,255,.15); }
.btn.primary:hover { background: linear-gradient(135deg, #0d8a55 0%, #006c40 55%, #00552f 100%); box-shadow: 0 10px 22px -10px rgba(0,96,57,.8), inset 0 1px 0 rgba(255,255,255,.18); transform: translateY(-1px); }
.btn.gold { background: linear-gradient(135deg, #d4b061, #A37E2C); border-color: #9a7526; color: #1c1407; }
:root[data-theme="dark"] .btn.primary { border-color: rgba(233,207,143,.28); }

/* Tarjetas */
.card, .kpi, .ucard { border-radius: var(--r); box-shadow: var(--shadow); }
.card-h { padding: 16px 20px; }
.card-h h3 { font-weight: 800; }
.card-b { padding: 20px; }
.kpi, .ucard { transition: box-shadow .2s, transform .2s, border-color .2s; }
a.kpi:hover, a.ucard:hover, .ucard:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); text-decoration: none; }
.ucard { border-top: 0; position: relative; overflow: hidden; padding: 20px 20px 18px; }
.ucard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 30%, transparent)); }
.ucard::after { content: ""; position: absolute; width: 180px; height: 180px; right: -70px; top: -90px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 12%, transparent), transparent 70%); pointer-events: none; }
.kpi { overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; border: 1px solid rgba(163,126,44,.14); pointer-events: none; }
.kpi .ki { border-radius: 12px; background: linear-gradient(135deg, var(--brand-050), color-mix(in srgb, var(--brand) 14%, var(--surface))); }
.kpi .ki.gold { background: linear-gradient(135deg, var(--gold-050), color-mix(in srgb, var(--gold) 16%, var(--surface))); }

/* Encabezado de página */
.page { padding: 28px; gap: 22px; }
.page-head h1 { font-size: 27px; font-weight: 800; letter-spacing: -.025em; }
.page-head h1::after { content: ""; display: block; width: 36px; height: 3px; border-radius: 3px; margin-top: 10px; background: linear-gradient(90deg, var(--gold-2), transparent); }

/* Chips, segmentos, pestañas */
.chip { transition: all .15s; }
.chip:hover { border-color: color-mix(in srgb, var(--gold) 50%, var(--border-2)); }
.chip.on { background: linear-gradient(135deg, #0b7a4b, #006039 60%, #004f2f); border-color: #005632; box-shadow: 0 4px 12px -6px rgba(0,96,57,.7); }
.seg { border-radius: 99px; } .seg button { border-radius: 99px; }
.seg button.on { box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 0 0 1px rgba(163,126,44,.25); }
.tabs .on { border-bottom-color: var(--gold-2); color: var(--fg); }

/* Formularios */
.input { border-radius: var(--r-sm); transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(201,162,79,.16); }

/* Tablas */
.tbl th { background: color-mix(in srgb, var(--brand) 4%, var(--surface)); color: color-mix(in srgb, var(--brand) 50%, var(--muted)); letter-spacing: .07em; font-size: 11px; }
.tbl tr.click:hover td { background: color-mix(in srgb, var(--gold) 6%, var(--surface)); }
.pill { border-radius: 99px; }
.badge.brand { background: linear-gradient(135deg, #0b7a4b, #006039); }


@media (max-width: 900px) {
  .page { padding: 18px 16px; }
  .page-head h1 { font-size: 24px; }
}
@media print { .side, .top { background: none !important; box-shadow: none !important; } .ucard::after, .kpi::after { display: none; } }
.ucard .unicas { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 18%, var(--border)); }
.ucard .unicas .l { font-size: 12px; font-weight: 600; color: var(--muted); }
.ucard .unicas b { font-size: 18px; font-variant-numeric: tabular-nums; }
.ucard .unicas .s { font-size: 12px; color: var(--muted); }

/* ===== Conversaciones 2.10 · se ve como chat ===== */
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.venta-row { display: grid; gap: 2px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.venta-row:last-child { border-bottom: 0; }
:root { --chat-bg: #eef2ef; --bub-in: #ffffff; --bub-out: var(--brand); --bub-out-fg: #fff; --bub-ia: #ffffff; }
:root[data-theme="dark"] { --chat-bg: #0a120e; --bub-in: #16221c; --bub-out: #0f6b44; --bub-out-fg: #f1f6f3; --bub-ia: #16221c; }
.cv-head { align-items: center; }
.cv-cfg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); display: inline-block; }
.cv-cfg-dot.on { background: #2fae74; box-shadow: 0 0 0 3px rgba(47,174,116,.18); } .cv-cfg-dot.off { background: var(--warn); }
.cv-modos-p { display: grid; gap: 10px; }
.cv-modo-row { display: grid; grid-template-columns: 10px 1fr minmax(0, 200px); gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.cv-modo-row .ldot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.cv-modo-row .pill { justify-self: start; }

.chat-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 16px; height: calc(100dvh - 64px - 150px); min-height: 520px; }
.chat-list, .chat-pane { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chat-list-h { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.chat-list-h .seg { display: flex; width: 100%; } .chat-list-h .seg button { flex: 1; }
#cv-tabs .badge:empty { display: none; }
.chat-list-b { overflow-y: auto; flex: 1; }
.chat-item { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none !important; }
.chat-item * { text-decoration: none !important; }
.chat-item:hover { background: var(--surface-2); }
.chat-item.on { background: var(--brand-050); box-shadow: inset 3px 0 0 var(--brand); }
.ci-b { min-width: 0; display: grid; gap: 2px; }
.ci-l1, .ci-l2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ci-n { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.chat-item.unread .ci-n { font-weight: 800; }
.ci-t { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--faint); }
.ci-who { display: inline-grid; place-items: center; color: var(--faint); } .ci-who.ia { color: var(--gold); }
.ci-l2 > .ell { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); }
.ci-l2 i { font-style: normal; color: var(--faint); }
.ci-st { flex: none; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 8px; line-height: 18px; }
.ci-st.bad { background: var(--bad); color: #fff; }
.ci-st.dotbad { color: var(--bad); padding-left: 0; } .ci-st.dotbad::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); margin-right: 5px; vertical-align: 1px; }
.ci-st.gold { background: var(--gold-050); color: var(--gold); }
.c-av { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13.5px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 82%, #fff), var(--c)); flex: none; }
.c-av.none { background: var(--surface-2); color: var(--faint); border: 1px solid var(--border-2); }
.c-av-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid var(--surface); }

.chat-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat-h .c-av { width: 38px; height: 38px; font-size: 12.5px; }
.chat-h-t { flex: 1; min-width: 0; } .chat-h-t b { font-size: 15px; }
.chat-h-s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.chat-alert { display: flex; gap: 8px; align-items: center; padding: 8px 16px; font-size: 12.5px; background: var(--bad-bg); color: var(--bad); border-bottom: 1px solid var(--border); }
.chat-alert span { color: var(--fg); } .chat-alert b { color: var(--bad); }
.clasificar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.clasificar-d { border-bottom: 1px solid var(--border); }
.clasificar-d > summary { padding: 7px 16px; font-size: 12px; color: var(--faint); cursor: pointer; }
.clasificar-d .clasificar { border-bottom: 0; padding-top: 0; }

.chat-msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 16px 22px 18px; background: var(--chat-bg);
  background-image: radial-gradient(color-mix(in srgb, var(--brand) 7%, transparent) 1px, transparent 1px); background-size: 22px 22px; }
.chat-day { align-self: center; margin: 6px 0; }
.chat-day span { display: inline-block; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 2px 10px; text-transform: capitalize; }
.chat-nada { margin: auto; color: var(--faint); font-size: 13px; }
.bub { position: relative; max-width: 72%; font-size: 14.5px; line-height: 1.45; padding: 7px 12px 6px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(16,32,24,.06); }
.bub:not(.first) { margin-top: -6px; }
.bub.in { align-self: flex-start; background: var(--bub-in); border: 1px solid var(--border); }
.bub.out { align-self: flex-end; background: var(--bub-out); color: var(--bub-out-fg); }
.bub.ia { align-self: flex-end; background: var(--bub-ia); border: 1px solid var(--border); border-left: 3px solid var(--gold); }
.bub.in.last { border-bottom-left-radius: 4px; } .bub.out.last, .bub.ia.last { border-bottom-right-radius: 4px; }
.bub .bt { float: right; margin: 6px 0 -2px 10px; font-size: 10.5px; color: var(--faint); white-space: nowrap; line-height: 1.6; }
.bub.out .bt { color: rgba(255,255,255,.75); } .b-ok { color: #8fd3ff; letter-spacing: -2px; } .bub.ia .b-ok { color: #2f8fd6; }
.ia-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold); }
.bub .ia-tag { display: flex; margin-bottom: 2px; }
.b-media { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; padding: 4px 10px 4px 8px; border-radius: 10px; background: color-mix(in srgb, currentColor 8%, transparent); }
.b-cap { flex-basis: 100%; font-weight: 400; }
.b-raro { font-style: italic; color: var(--faint); font-size: 13px; } .bub.out .b-raro { color: rgba(255,255,255,.75); }
.b-reac { position: absolute; bottom: -12px; right: 10px; font-size: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 0 5px; line-height: 20px; box-shadow: var(--shadow); }
.bub.in .b-reac { right: auto; left: 10px; } .bub:has(.b-reac) { margin-bottom: 10px; }

.borrador { margin: 0; padding: 12px 16px; border-top: 1px solid var(--border); border-left: 3px solid var(--gold); display: grid; gap: 8px; background: color-mix(in srgb, var(--gold) 6%, var(--surface)); }
.bor-h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.bor-txt { display: grid; gap: 6px; font-size: 14px; line-height: 1.45; } .bor-txt p { margin: 0; white-space: pre-wrap; }
.bor-acc { display: flex; flex-wrap: wrap; gap: 6px; }
.bor-f { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; } .bor-f .faint { margin-right: auto; }
.bor-ed { font-size: 14px; }
.chat-citas { padding: 10px 16px; border-top: 1px solid var(--border); font-size: 13px; display: grid; gap: 4px; }

.chat-foot { padding: 10px 14px 8px; border-top: 1px solid var(--border); background: var(--surface); display: grid; gap: 4px; }
.chat-compose { display: flex; gap: 8px; align-items: flex-end; }
.chat-compose textarea { flex: 1; resize: none; border: 1px solid var(--border-2); border-radius: 22px; padding: 10px 16px; font: inherit; font-size: 14.5px; line-height: 22px; max-height: 148px; background: var(--surface-2); color: var(--fg); }
.chat-compose textarea:focus { outline: none; border-color: var(--gold-2, #C9A24F); box-shadow: 0 0 0 4px rgba(201,162,79,.16); background: var(--surface); }
.chat-send { width: 44px; height: 44px; border-radius: 50%; border: 0; flex: none; display: grid; place-items: center; color: #fff; cursor: pointer; background: linear-gradient(135deg, #0b7a4b, #006039 60%, #004a2c); box-shadow: 0 6px 14px -6px rgba(0,96,57,.7); }
.chat-send:disabled { opacity: .5; }
.chat-hint { font-size: 11.5px; color: var(--faint); padding-left: 16px; visibility: hidden; } .chat-hint.on { visibility: visible; }
.chat-closed { display: flex; align-items: center; gap: 12px; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding: 4px 2px; }
.chat-empty { margin: auto; display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--faint); padding: 24px; }
.chat-empty h3 { color: var(--fg); font-size: 16px; }
.chat-empty-k { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chat-pane > .card-b, .chat-pane > .skel { margin: auto 0; }
.solo-movil { display: none; }
@media (max-width: 900px) {
  .chat-layout { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 64px - 36px); min-height: 0; }
  .cv-head p { display: none; }
  .chat-layout.con-chat .chat-list { display: none; }
  .chat-layout:not(.con-chat) .chat-pane { display: none; }
  .chat-layout.con-chat { margin: -6px -10px 0; }
  .solo-movil { display: inline-flex; }
  .bub { max-width: 88%; }
  .chat-msgs { padding: 12px 12px 16px; }
  .chat-h { padding: 10px 12px; gap: 8px; }
  .chat-closed { flex-direction: column; align-items: stretch; }
}
@media print { .chat-msgs { background: none; } }
.c-av { text-shadow: 0 1px 2px rgba(0,0,0,.35); }
:root[data-theme="dark"] .c-av:not(.none) { background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #000)); }
@media (max-width: 900px) { .cv-head.con-chat { display: none; } .chat-layout.con-chat { height: calc(100dvh - 64px - 24px); } }
.chat-hint { display: none; visibility: visible; } .chat-hint.on { display: block; }
@media (max-width: 900px) { .chat-h .pill.u { display: none; } }

/* 2.10 · embudo legible */
.kanban { grid-auto-columns: minmax(270px, 1fr); }
.kcard .nx-t { font-size: 12.5px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.kcard .next { justify-content: space-between; }

/* 2.10 · vehículos: versión como subtítulo y tarjetas en el celular */
.tbl-cards .name .sub { max-width: 240px; font-size: 11.5px; font-weight: 400; }
@media (max-width: 900px) {
  .tbl-cards thead { display: none; }
  .tbl-cards, .tbl-cards tbody, .tbl-cards tr, .tbl-cards td { display: block; width: 100%; }
  .tbl-cards tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .tbl-cards td { padding: 0; border: 0; text-align: left !important; font-size: 13px; }
  .tbl-cards td.name { grid-column: 1 / -1; font-size: 14.5px; }
  .tbl-cards td.name .sub { max-width: none; }
  .tbl-cards td:not(.name)::before { content: attr(data-l); display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
}
