:root {
  --ink: #061c36;
  --ink-2: #34506b;
  --muted: #6b7f8e;
  --line: #e3e9ee;
  --bg: #f2f7fb;
  --card: #ffffff;
  --green: #0a6fb0;
  --green-2: #3ed4ef;
  --green-soft: #ddeef4;
  /* Turquesa de la ola del logo: solo para "hecho / pagado / listo". */
  --teal: #0a8f8c;
  --teal-soft: #dcf5f3;
  --amber: #c98a12;
  --amber-soft: #fcf3dc;
  /* Paleta de marca sacada del logo WDM: azul marino, azul brillante y cian del edificio, turquesa de la ola.
     "--green*" quedan con ese nombre por compatibilidad, pero ahora son el azul y el cian del logo. "blue" y "violet" quedan dentro de la familia azul marino;
     ámbar y rojo solo se usan para avisos y problemas. */
  --blue: #0b3d6e;
  --blue-soft: #e7f1f8;
  --red: #c8433a;
  --red-soft: #fbe7e5;
  --violet: #1676b8;
  --violet-soft: #e9f3fa;
  --navy: #0b3d6e;
  --navy-2: #12558f;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15,42,61,.06), 0 4px 16px rgba(15,42,61,.06);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-size: 14.5px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 15% 0%, #12558f 0, #0b3d6e 30%, var(--ink) 62%), var(--ink); }
.login-card { width: 100%; max-width: 360px; background: var(--card); border-radius: 16px; padding: 28px;
  display: grid; gap: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35); position: relative; }
.login-card .lang-toggle { position: absolute; top: 14px; right: 14px; }
.error { color: var(--red); min-height: 1em; margin: 0; font-size: 13px; }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand strong { display: block; font-size: 16px; letter-spacing: -.01em; }
.brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.logo { width: 40px; height: 40px; object-fit: contain; display: block; flex: none; }
.login-logo { width: 230px; height: auto; margin: 4px auto 0; display: block; }
.login-sub { margin: -6px 0 4px; text-align: center; font-size: 11px; letter-spacing: .3em; color: var(--muted); font-weight: 600; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, #0b3d6e 0%, #082f55 60%, #061f3b 100%); color: #e3eff8; padding: 18px 12px; display: flex; flex-direction: column;
  gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; }
.sidebar > * { flex-shrink: 0; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 6px; }
/* Pantallas bajas: el menú se compacta para que todo quepa dentro del panel azul */
@media (min-width: 861px) and (max-height: 900px) {
  .sidebar { gap: 12px; padding: 14px 12px 12px; }
  .sidebar > .lang-seg { margin-top: 4px; margin-bottom: 4px; }
  nav a { padding: 7px 10px; }
}
@media (min-width: 861px) and (max-height: 760px) {
  nav { gap: 0; }
  nav a { padding: 5px 10px; font-size: 14px; }
}
.sidebar .brand { padding: 0 8px; color: #fff; }
.sidebar .brand small { color: #a9c9e2; }
.sidebar .brand .logo { width: 50px; height: 50px; flex: none; padding: 3px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 2px rgba(62,212,239,.45), 0 4px 12px rgba(0,0,0,.25); }
.brand-txt { min-width: 0; }
.sidebar .brand-txt strong { display: flex; align-items: center; gap: 7px; font-size: 18px; font-weight: 700; letter-spacing: -.015em; line-height: 1.15; }
.sidebar .brand-txt strong small { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .1em; color: #d3e5f3;
  padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,.12); line-height: 1.3; white-space: nowrap; }
.sidebar .tagline { display: block; margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(62,212,239,.35);
  font-size: 9.5px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--green-2); white-space: nowrap; }
nav { display: grid; gap: 2px; }
nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: #d3e5f3;
  text-decoration: none; font-weight: 500; }
nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
nav a.active { background: linear-gradient(135deg, #5fdcf2 0%, #3ed4ef 45%, #1fa9db 100%); color: var(--ink); font-weight: 600; box-shadow: 0 2px 10px rgba(6,37,60,.25); }
nav a.active svg { color: var(--ink); }
nav a.active .badge { background: var(--navy); color: #fff; }
.badge { margin-left: auto; background: var(--green-2); color: var(--ink); font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 0 8px; font-size: 13px; color: #a9c9e2; }
.side-foot #whoami { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .link { color: #d3e5f3; }

main { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 28px 8px; flex-wrap: wrap; }
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.view { padding: 12px 28px 40px; }

/* ---------- Controls ---------- */
.btn { border: 1px solid var(--line); background: var(--card); border-radius: 9px; padding: 8px 14px; cursor: pointer;
  font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: #c9d4dc; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: #1c5063; }
.btn.danger { color: var(--red); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: wait; }
.link { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font-weight: 500; }
.icon { background: none; border: 0; font-size: 18px; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.icon:hover { background: var(--bg); }
.lang-toggle { border: 1px solid currentColor; background: none; border-radius: 6px; font-size: 11px; font-weight: 700;
  padding: 2px 6px; cursor: pointer; opacity: .8; }
label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
input, select, textarea { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: #fff; font-weight: 400; width: 100%; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(10,111,176,.3); border-color: var(--green); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); }
.check { display: flex; align-items: center; gap: 8px; }
.search { max-width: 280px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.chips input { width: 14px; height: 14px; }

/* ---------- Cards / KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.kpi span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi strong { display: block; font-size: 28px; letter-spacing: -.02em; margin-top: 4px; }
.kpi.accent { background: linear-gradient(135deg, var(--ink), #164252); color: #fff; }
.kpi.accent span { color: #9db4c4; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 10px; font-size: 15px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.empty { color: var(--muted); padding: 18px; text-align: center; }
.notice { background: var(--amber-soft); color: #7a5208; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.notice .btn { margin-top: 8px; }

/* ---------- Lists ---------- */
.list { display: grid; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 6px; border-top: 1px solid var(--line);
  cursor: pointer; align-items: center; }
.row:first-child { border-top: 0; }
.row:hover { background: #f9fbfc; }
.row .t { font-weight: 600; }
.row .s { color: var(--muted); font-size: 13px; }
table.tbl { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding: 10px 12px; background: #fafcfd; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: #f9fbfc; }
.tbl .sub { color: var(--muted); font-size: 12.5px; }
.table-wrap { overflow-x: auto; }

/* ---------- Pills ---------- */
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.pill.green { background: var(--teal-soft); color: #08706e; }
.pill.amber { background: var(--amber-soft); color: #8a5d06; }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #eaf0f4; border-radius: var(--radius); padding: 10px; min-height: 200px; }
.col.over { outline: 2px dashed var(--green); }
.col h4 { margin: 2px 4px 10px; font-size: 13px; display: flex; justify-content: space-between; color: var(--ink-2); }
.card { background: var(--card); border-radius: 10px; padding: 11px 12px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(15,42,61,.08);
  cursor: pointer; border-left: 3px solid transparent; }
.card:hover { box-shadow: var(--shadow); }
.card.new { border-left-color: var(--green-2); }
.card .t { font-weight: 600; }
.card .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Agenda ---------- */
.week-nav { display: flex; align-items: center; gap: 8px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); min-height: 160px; padding: 8px; }
.day.today { outline: 2px solid var(--green-2); }
.day h5 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.day h5 b { color: var(--ink); font-size: 16px; margin-left: 4px; }
.job { background: var(--blue-soft); border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; font-size: 12.5px; cursor: pointer; }
.job.done { background: var(--green-soft); }
.job.cancelled { background: var(--bg); text-decoration: line-through; color: var(--muted); }
.job b { display: block; }
.day .add { width: 100%; border: 1px dashed var(--line); background: none; border-radius: 8px; color: var(--muted); cursor: pointer; padding: 4px; font-size: 12px; }

/* ---------- Drawer ---------- */
.drawer-back { position: fixed; inset: 0; background: rgba(15,42,61,.35); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(480px, 100%); background: var(--card); z-index: 50;
  transform: translateX(100%); transition: transform .2s ease; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.15); }
.drawer.open { transform: none; }
.drawer header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer h2 { margin: 0; font-size: 17px; }
.drawer-body { padding: 16px 18px 28px; overflow-y: auto; display: grid; gap: 12px; align-content: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick a { text-decoration: none; }
.info { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 13px; white-space: pre-wrap; color: var(--ink-2); }
.related h4 { margin: 8px 0 4px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Demo ---------- */
.demo-bar { background: repeating-linear-gradient(-45deg, #fcf3dc, #fcf3dc 12px, #f8e9c2 12px, #f8e9c2 24px); color: #7a5208;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-align: center; padding: 6px 12px; position: sticky; top: 0; z-index: 20; }
body.demo .sidebar { background: linear-gradient(180deg, #0b3d6e 0%, #082f55 60%, #061f3b 100%); }
.demo-bar .link { color: #7a5208; text-decoration: underline; font-weight: 700; margin-left: 8px; }
body.demo .sidebar .brand-txt strong small { font-size: 0; background: rgba(240,180,41,.18); }
body.demo .sidebar .brand-txt strong small::after { content: "DEMO"; font-size: 9.5px; color: #f5c451; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 10px; z-index: 60; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.err { background: var(--red); }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px; z-index: 30; gap: 0; }
  .sidebar { overflow: visible; }
  .sidebar .brand, .side-foot { display: none; }
  nav { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  nav a { flex-direction: column; gap: 2px; font-size: 10.5px; padding: 6px 2px; position: relative; }
  nav a .badge { position: absolute; top: 2px; right: 18%; margin: 0; }
  main { padding-bottom: 72px; }
  .topbar { padding: 16px 16px 6px; }
  .view { padding: 8px 16px 32px; }
  .grid2, .form-grid { grid-template-columns: 1fr; }
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .search { max-width: none; flex: 1; }
  .hide-sm { display: none; }
}

/* ======================= Inicio: cielo del día y clima ======================= */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hq { position: relative; overflow: hidden; isolation: isolate; color: #fff; border-radius: 20px; padding: 24px 24px 8px; margin: 0 0 16px;
  box-shadow: 0 18px 40px -24px rgba(10, 33, 57, .75); background: var(--ink); transition: background .6s; }
.hq > :not(.hq-sky) { position: relative; z-index: 1; }
.hq.sky-dawn { background: linear-gradient(160deg, #142f52 0%, #2f4b78 45%, #9e6a6c 85%, #d98b5f 100%); }
.hq.sky-day { background: linear-gradient(165deg, #0f3554 0%, #165a6a 55%, #0a6fb0 100%); }
.hq.sky-dusk { background: linear-gradient(160deg, #13324a 0%, #43386a 50%, #95506b 85%, #cf785e 100%); }
.hq.sky-night { background: linear-gradient(170deg, #061a2a 0%, #061c36 60%, #123355 100%); }
.hq-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hq-glow { position: absolute; width: 420px; height: 420px; border-radius: 50%; filter: blur(10px); opacity: .55; }
.sky-dawn .hq-glow { left: -120px; bottom: -220px; background: radial-gradient(circle, rgba(255,196,120,.75), rgba(255,196,120,0) 65%); }
.sky-day .hq-glow { right: -140px; top: -200px; background: radial-gradient(circle, rgba(255,236,170,.5), rgba(255,236,170,0) 65%); }
.sky-dusk .hq-glow { right: -120px; bottom: -230px; background: radial-gradient(circle, rgba(255,150,120,.7), rgba(255,150,120,0) 65%); }
.sky-night .hq-glow { right: 6%; top: -240px; background: radial-gradient(circle, rgba(170,218,255,.35), rgba(170,218,255,0) 65%); }
.hq-stars { position: absolute; inset: 0; opacity: 0; }
.sky-night .hq-stars, .sky-dawn .hq-stars { opacity: .9; background-image:
  radial-gradient(1.2px 1.2px at 8% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 22% 42%, #fff 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 35% 12%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 48% 30%, #fff 50%, transparent 51%),
  radial-gradient(1.3px 1.3px at 61% 9%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 72% 36%, #fff 50%, transparent 51%),
  radial-gradient(1.6px 1.6px at 84% 16%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 93% 44%, #fff 50%, transparent 51%),
  radial-gradient(1px 1px at 15% 60%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 55% 55%, #fff 50%, transparent 51%); }
.sky-dawn .hq-stars { opacity: .35; }
.hq-fx { position: absolute; inset: 0; }
.hq-fx i { position: absolute; top: -10%; display: block; }
.hq-fx.is-rain i { width: 1.5px; height: 16px; background: linear-gradient(rgba(190,225,255,0), rgba(190,225,255,.9)); animation: fx-rain linear infinite; }
.hq-fx.is-snow i { width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.8); animation: fx-snow linear infinite; }
@keyframes fx-rain { to { transform: translate(-30px, 520px); } }
@keyframes fx-snow { 0% { transform: translate(0, 0); } 50% { transform: translate(14px, 260px); } 100% { transform: translate(-6px, 540px); } }

.hq-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hq-date { margin: 0; color: #9ee6f6; font-size: 14px; font-weight: 500; text-transform: capitalize; }
.hq-title { margin: 2px 0 4px; font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -.4px; color: #fff; }
.hq-sub { margin: 0; color: #d7e4ee; font-size: 15px; }
.hq-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hq-btn { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 12px; text-decoration: none; cursor: pointer;
  font-weight: 600; font-size: 14.5px; color: #fff; background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.3); white-space: nowrap; }
.hq-btn.is-main { background: var(--green-2); border-color: var(--green-2); color: var(--ink); }
.hq-btn:hover { border-color: #fff; }
.hq-btn:focus-visible, .tl-job:focus-visible, .hq-list button:focus-visible, .kpi:focus-visible, .wk-day:focus-visible { outline: 3px solid #9ee6f6; outline-offset: 2px; }

.hq-wx { display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 10px; border-radius: 16px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: wx-in .6s ease both; margin-right: auto; }
@keyframes wx-in { from { transform: translateY(6px); } to { transform: none; } }
.hq-wx .wx-big { width: 52px; height: 52px; flex: none; }
.hq-wx-t { display: grid; line-height: 1.2; }
.hq-wx-t strong { font-size: 26px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.hq-wx-t span { font-size: 13.5px; color: #e3ecf4; }
.hq-wx-t em { font-style: normal; font-size: 12px; color: #b9cad9; font-variant-numeric: tabular-nums; }

.tl { margin: 52px 16px 4px; }
.tl-track { position: relative; height: 40px; border-bottom: 2px solid rgba(255,255,255,.22); }
.tl-tick { position: absolute; bottom: -2px; height: 10px; border-left: 1px solid rgba(255,255,255,.35); }
.tl-tick span { position: absolute; top: 14px; left: 0; transform: translateX(-50%); font-size: 11.5px; color: #b6c6d4; white-space: nowrap; }
.tl-now { position: absolute; bottom: -6px; top: 0; width: 2px; background: rgba(255,211,107,.7); border-radius: 2px; }
.tl-sun { position: absolute; top: -9px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; z-index: 2;
  background: radial-gradient(circle at 40% 40%, #fff3c4, #ffc94d 60%, #f5a623); box-shadow: 0 0 0 4px rgba(255,211,107,.25), 0 0 18px 6px rgba(255,201,77,.55); animation: sun-pulse 3.2s ease-in-out infinite; }
.tl-sun.is-moon { background: transparent; box-shadow: inset -6px -2px 0 0 #e9f3fb, 0 0 16px 4px rgba(200,231,255,.35); animation: none; }
@keyframes sun-pulse { 50% { box-shadow: 0 0 0 7px rgba(255,211,107,.12), 0 0 26px 10px rgba(255,201,77,.45); } }
.tl-job { position: absolute; bottom: -10px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; padding: 0; cursor: pointer;
  background: #fff; border: 3px solid var(--ink); box-shadow: 0 0 0 2px #fff; z-index: 3; }
.tl-job.s-In-progress { background: #f5c26b; box-shadow: 0 0 0 2px #f5c26b; }
.tl-job.s-Done { background: var(--green-2); box-shadow: 0 0 0 2px var(--green-2); }
.tl-job.s-Cancelled { background: #f08a80; box-shadow: 0 0 0 2px #f08a80; }
.tl-job:hover { transform: scale(1.15); }
.tl-wx { position: absolute; left: 0; right: 0; top: -44px; height: 30px; pointer-events: none; }
.tl-wx-h { position: absolute; top: 0; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; pointer-events: auto; }
.tl-wx-h .wx { width: 22px; height: 22px; }
.tl-wx-h b { font-size: 12px; font-weight: 600; color: #e3ecf4; font-variant-numeric: tabular-nums; }

.hq-list { list-style: none; margin: 34px 0 6px; padding: 0; }
.hq-list li + li { border-top: 1px solid rgba(255,255,255,.12); }
.hq-list button { width: 100%; display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; align-items: center; padding: 11px 2px;
  color: #fff; background: none; border: 0; text-align: left; cursor: pointer; }
.hq-list button:hover .hq-who strong { text-decoration: underline; text-underline-offset: 3px; }
.hq-time { font-weight: 600; white-space: nowrap; }
.hq-who { min-width: 0; }
.hq-who strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hq-who span { display: block; color: #b6c6d4; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hq-state { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.12); white-space: nowrap; }
.hq-state.s-In-progress { background: #f5c26b; color: #3d2a05; }
.hq-state.s-Done { background: var(--green-2); color: #0b2d3a; }
.hq-state.s-Cancelled { background: #f08a80; color: #451410; }
.hq-empty { margin: 32px 0 14px; color: #d7e4ee; }
.hq-empty .link { color: #9ee6f6; font-weight: 700; }

.hq-alerts { display: grid; gap: 8px; margin: 4px 0 16px; }
.hq-alert { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16); color: #fff; font-size: 13.5px; animation: wx-in .6s ease both; }
.hq-alert .wx { width: 26px; height: 26px; flex: none; }
.hq-alert span { flex: 1; min-width: 0; }
.hq-alert a { flex: none; color: #9ee6f6; font-weight: 700; text-decoration: none; white-space: nowrap; }
.hq-alert.a-snow { background: rgba(200,225,255,.14); border-color: rgba(200,225,255,.35); }
.hq-alert.a-wind, .hq-alert.a-cold, .hq-alert.a-heat { background: rgba(255,200,120,.12); border-color: rgba(255,200,120,.3); }

/* dibujos del clima */
.wx { overflow: visible; }
.wx .wx-sun circle { fill: #ffd36b; }
.wx .wx-rays line { stroke: #ffd36b; stroke-width: 1.7; stroke-linecap: round; }
.wx .wx-moon { fill: #e9f3fb; }
.wx .wx-cloud { fill: rgba(255,255,255,.93); }
.wx .wx-drops line { stroke: #8fd3ff; stroke-width: 1.6; stroke-linecap: round; }
.wx .wx-flakes circle { fill: #fff; }
.wx .wx-bolt { fill: #ffd36b; }
.wx .wx-fog line { stroke: rgba(255,255,255,.75); stroke-width: 1.6; stroke-linecap: round; }
.wx .wx-thermo rect, .wx .wx-thermo circle { fill: none; stroke: #ffd36b; stroke-width: 1.6; }
.wx-cold .wx-thermo rect, .wx-cold .wx-thermo circle { stroke: #8fd3ff; }
@media (prefers-reduced-motion: no-preference) {
  .wx .wx-rays { transform-origin: 12px 12px; animation: wx-spin 14s linear infinite; }
  .wx .wx-cloud { animation: wx-drift 5s ease-in-out infinite alternate; }
  .wx .wx-drops line { animation: wx-fall 1s linear infinite; }
  .wx .wx-drops line:nth-child(2) { animation-delay: -.33s; } .wx .wx-drops line:nth-child(3) { animation-delay: -.66s; }
  .wx .wx-flakes circle { animation: wx-flake 2.4s ease-in-out infinite; }
  .wx .wx-flakes circle:nth-child(2) { animation-delay: -.8s; } .wx .wx-flakes circle:nth-child(3) { animation-delay: -1.6s; }
  .wx .wx-bolt { animation: wx-flash 2.8s steps(1) infinite; }
  .tl-job { transition: transform .15s; }
}
@keyframes wx-spin { to { transform: rotate(360deg); } }
@keyframes wx-drift { from { transform: translateX(-1px); } to { transform: translateX(1.5px); } }
@keyframes wx-fall { 0% { transform: translateY(-2px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(3px); opacity: 0; } }
@keyframes wx-flake { 0%, 100% { transform: translate(0, -1px); } 50% { transform: translate(.8px, 1.5px); } }
@keyframes wx-flash { 0%, 80%, 100% { opacity: 1; } 85% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .tl-sun { animation: none; } .hq-fx { display: none; } }

/* números, atención y semana */
a.kpi { text-decoration: none; color: inherit; display: block; transition: transform .15s, box-shadow .15s; }
a.kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(10,33,57,.1); }
.kpi em { display: block; font-style: normal; font-size: 12px; color: var(--green); font-weight: 600; margin-top: 2px; }
.p-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.p-head a { color: var(--green); font-weight: 600; text-decoration: none; font-size: 13.5px; }
.attn-panel { background: #fff8ea; border: 1px solid #f1dcae; box-shadow: none; }
.attn-panel h3 { color: #7a5208; }
.attn { list-style: none; margin: 0; padding: 0; }
.attn li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; color: #5c3d09; }
.attn li + li { border-top: 1px solid #f1dcae; }
.attn-ico { width: 20px; height: 20px; border-radius: 50%; background: #f0b429; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.attn .link { color: #7a4f0e; font-weight: 700; white-space: nowrap; }
.wk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 6px; }
.wk-day { display: grid; justify-items: center; gap: 5px; text-decoration: none; color: var(--ink); border-radius: 10px; padding: 6px 0; }
.wk-bar { position: relative; width: 100%; max-width: 30px; height: 84px; display: flex; align-items: flex-end; border-radius: 8px; background: #edf1f3; overflow: hidden; }
.wk-fill { position: relative; width: 100%; background: #b4d1dc; border-radius: 8px 8px 0 0; display: flex; align-items: flex-end; }
.wk-done { width: 100%; background: var(--green); }
.wk-n { font-weight: 700; font-size: 15px; }
.wk-d { font-size: 12px; color: var(--muted); white-space: nowrap; text-transform: capitalize; }
.wk-day.is-today { background: var(--green-soft); }
.wk-day.is-today .wk-d { color: var(--green); font-weight: 700; }
.h-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

@media (max-width: 640px) {
  .hq { padding: 18px 14px 6px; border-radius: 16px; }
  .hq-title { font-size: 24px; }
  .hq-wx { order: 3; margin-right: 0; width: 100%; }
  .hq-actions { width: 100%; }
  .hq-btn { flex: 1; justify-content: center; padding: 0 10px; font-size: 14px; }
  .tl { margin: 52px 6px 4px; }
  .tl-wx-h b { display: none; }
  .tl-tick span { font-size: 10px; }
  .hq-list button { grid-template-columns: 70px 1fr; gap: 8px; }
  .hq-state { grid-column: 2; justify-self: start; }
  .hq-alert { flex-wrap: wrap; }
  .attn li { grid-template-columns: 22px 1fr; }
  .attn li .link { grid-column: 2; justify-self: start; }
}

body.on-home .topbar h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body.on-home .topbar { padding-top: 14px; }
.kpi strong { font-size: 26px; }

/* ======================= Inicio premium (v2) ======================= */
.hq { padding: 28px 28px 10px; border-radius: 24px; box-shadow: 0 30px 60px -34px rgba(6,26,42, .85), inset 0 1px 0 rgba(255,255,255,.06); }
.hq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 28px; align-items: center; }
.hq-hello { min-width: 0; }
.hq-date { font-size: 13px; letter-spacing: .02em; color: #9ee6f6; opacity: .95; }
.hq-title { font-size: 34px; font-weight: 700; letter-spacing: -.6px; margin: 4px 0 6px; }
.hq-title span { background: linear-gradient(90deg, #bfe4f2, #7fc0d8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hq-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14.5px; color: #cddbe6; }
.hq-sub .dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.35); display: inline-block; }
.hq-actions { margin-top: 20px; gap: 10px; }
.hq-btn { min-height: 40px; padding: 0 16px 0 14px; gap: 8px; border-radius: 999px; font-size: 14px; letter-spacing: .01em;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .2s, border-color .2s, transform .2s, box-shadow .2s; }
.hq-btn b { font-weight: 700; font-size: 16px; line-height: 1; color: #9ee6f6; }
.hq-btn:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.22); transform: translateY(-1px); }
.hq-btn.is-main { background: linear-gradient(135deg, #7fe4f5, #1fb6e0); border-color: transparent; color: #04213a;
  box-shadow: 0 10px 24px -10px rgba(62,212,239, .75), inset 0 1px 0 rgba(255,255,255,.45); }
.hq-btn.is-main b { color: #04213a; }
.hq-btn.is-main:hover { background: linear-gradient(135deg, #a1d8ec, #62b0cc); }
.hq-btn.is-ghost { background: transparent; border-color: transparent; padding: 0 10px; color: #cfe2e9; }
.hq-btn.is-ghost:hover { background: rgba(255,255,255,.06); }

/* tarjeta del clima, tipo vidrio */
.hq-wx { display: grid; gap: 14px; align-items: stretch; margin: 0; padding: 16px 18px 14px; border-radius: 20px; animation: wx-in .6s ease both;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04) 70%); border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 24px 44px -26px rgba(0,0,0,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.wx-now { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.hq-wx .wx-big { width: 56px; height: 56px; filter: drop-shadow(0 6px 12px rgba(0,0,0,.25)); }
.wx-temp { display: grid; line-height: 1.05; }
.wx-temp strong { font-size: 40px; font-weight: 700; letter-spacing: -1.5px; color: #fff; font-variant-numeric: tabular-nums; }
.wx-temp sup { font-size: 15px; font-weight: 600; letter-spacing: 0; margin-left: 2px; vertical-align: 18px; color: #d9e6ef; }
.wx-temp span { font-size: 13.5px; color: #d9e6ef; margin-top: 3px; }
.wx-place { align-self: start; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; color: #9ee6f6; background: rgba(158,230,246,.12);
  padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.wx-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wx-chip { display: grid; gap: 1px; padding: 7px 8px; border-radius: 12px; background: rgba(255,255,255,.06); text-align: center; }
.wx-chip small { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #9fb4c5; }
.wx-chip b { font-size: 13.5px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.wx-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.wx-day { display: grid; justify-items: center; gap: 2px; padding: 4px 0; border-radius: 12px; }
.wx-day.is-today { background: rgba(255,255,255,.06); }
.wx-day small { font-size: 11px; text-transform: capitalize; color: #b7c8d6; font-weight: 600; }
.wx-day .wx { width: 26px; height: 26px; }
.wx-day span { font-size: 12.5px; color: #9fb4c5; font-variant-numeric: tabular-nums; }
.wx-day span b { color: #fff; font-weight: 600; }
/* esqueleto mientras carga */
.hq-wx.is-loading { min-height: 196px; align-content: start; }
.sk { display: block; border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.14), rgba(255,255,255,.06)); background-size: 200% 100%; animation: sk 1.4s ease-in-out infinite; }
.sk-a { height: 56px; width: 70%; } .sk-b { height: 44px; } .sk-c { height: 56px; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* línea del día más fina */
.tl { margin: 62px 8px 2px; }
.tl-track { height: 34px; border-bottom: 1px solid rgba(255,255,255,.18); }
.tl-tick { height: 6px; border-left-color: rgba(255,255,255,.28); }
.tl-tick span { top: 12px; font-size: 11px; color: #9fb4c5; letter-spacing: .02em; }
.tl-wx { top: -46px; }
.tl-wx-h { gap: 3px; padding: 2px 8px 2px 3px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.06); }
.tl-wx-h .wx { width: 20px; height: 20px; }
.tl-wx-h b { font-size: 11.5px; color: #e3ecf4; }
.tl-sun { width: 16px; height: 16px; margin-left: -8px; top: -8px; }
.hq-list { margin-top: 30px; }
.hq-list button { border-radius: 12px; padding: 11px 10px; transition: background .2s; }
.hq-list button:hover { background: rgba(255,255,255,.05); }
.hq-empty { margin: 30px 0 14px; display: flex; align-items: center; gap: 10px; color: #b7c8d6; font-size: 14px; }
.hq-alert { border-radius: 14px; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.1); }

@media (max-width: 900px) {
  .hq-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
  .hq { padding: 20px 16px 6px; border-radius: 20px; }
  .hq-title { font-size: 26px; }
  .hq-actions { width: auto; }
  .hq-btn { flex: 1 1 auto; justify-content: center; }
  .hq-btn.is-ghost { flex: 0 0 auto; }
  .wx-temp strong { font-size: 34px; }
  .tl { margin: 56px 4px 2px; }
  .tl-wx-h { padding: 2px; }
}
.tl { margin-top: 46px; }
.tl-track { height: 16px; }
.tl-wx { top: -30px; }
.tl-now { top: -4px; }
.tl-sun { top: -2px; }
@media (max-width: 640px) { .tl { margin-top: 44px; } }
@media (max-width: 640px) { .hq-alert a { flex-basis: 100%; padding-left: 36px; } }

/* ======================= Efectos del clima en toda la tarjeta ======================= */
.fx-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.fx-layer i { position: absolute; display: block; }

/* tonos de la tarjeta según el clima */
.hq.wx-sun.sky-day { background: linear-gradient(160deg, #1e6aa6 0%, #3b93c8 45%, #6cbfdc 100%); }
.hq.wx-sun.sky-dawn { background: linear-gradient(160deg, #2e5f99 0%, #6b8fbf 45%, #e0a174 100%); }
.hq.wx-sun.sky-dusk { background: linear-gradient(160deg, #2b618a 0%, #6e6fa3 45%, #e08a62 100%); }
.hq.wx-sun .hq-glow { opacity: 0; }
.hq.wx-sun .hq-sub, .hq.wx-sun .hq-date { color: #f2f8fc; }
.hq.wx-sun .hq-title { text-shadow: 0 2px 16px rgba(10,50,80, .35); }
.hq.wx-sun .hq-title span { background: linear-gradient(90deg, #fff7d6, #ffe08a); -webkit-background-clip: text; background-clip: text; }
.hq.wx-sun .hq-wx { background: linear-gradient(160deg, rgba(255,255,255,.26), rgba(255,255,255,.1) 70%); border-color: rgba(255,255,255,.3); }
.hq.wx-sun .tl-tick span, .hq.wx-sun .hq-who span { color: #e6f2fa; }
.hq.wx-cloud.sky-day, .hq.wx-fog.sky-day { background: linear-gradient(165deg, #3a5068 0%, #56708a 55%, #7d93a6 100%); }
.hq.wx-rain.sky-day, .hq.wx-storm.sky-day { background: linear-gradient(165deg, #1f3247 0%, #2f4a63 55%, #45627c 100%); }
.hq.wx-snow.sky-day { background: linear-gradient(165deg, #3d5878 0%, #6d88a6 55%, #a7bdd2 100%); }
.hq.wx-rain .hq-glow, .hq.wx-storm .hq-glow, .hq.wx-cloud .hq-glow, .hq.wx-snow .hq-glow, .hq.wx-fog .hq-glow { opacity: .15; }
.hq.wx-rain .hq-stars, .hq.wx-storm .hq-stars, .hq.wx-snow .hq-stars, .hq.wx-fog .hq-stars, .hq.wx-clear-night .hq-stars { opacity: 0; }

/* lluvia en diagonal por todo el rectángulo */
.fx-rain i { top: -20%; width: 1.4px; height: 22px; border-radius: 1px; transform: rotate(14deg);
  background: linear-gradient(rgba(200, 228, 255, 0), rgba(200, 228, 255, .95)); animation: rain-fall linear infinite; }
.fx-rain.far i { height: 14px; width: 1px; }
@keyframes rain-fall { from { transform: translate(0, 0) rotate(14deg); } to { transform: translate(-190px, 860px) rotate(14deg); } }
/* gotitas pegadas al vidrio */
.fx-glass i { border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.75) 0 14%, rgba(220,238,255,.22) 30%, rgba(140,180,220,.12) 60%, rgba(255,255,255,.35) 100%);
  box-shadow: 0 1px 2px rgba(0, 20, 40, .35), inset 0 -1px 1px rgba(255,255,255,.25); animation: glass-slide ease-in infinite; }
@keyframes glass-slide { 0%, 55% { transform: translateY(0); opacity: .95; } 92% { transform: translateY(120px); opacity: .7; } 100% { transform: translateY(150px); opacity: 0; } }
/* salpicaduras */
.fx-splash i { bottom: 6px; width: 12px; height: 3px; border-radius: 50%; border: 1px solid rgba(200, 228, 255, .6); animation: splash ease-out infinite; }
@keyframes splash { 0% { transform: scale(.2); opacity: 0; } 20% { opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
/* relámpagos */
.fx-flash { background: rgba(230,244,255, .0); animation: flash 7s infinite; }
@keyframes flash { 0%, 61%, 66%, 100% { background: rgba(230,244,255,0); } 62% { background: rgba(230,244,255,.55); } 63% { background: rgba(230,244,255,.1); } 64% { background: rgba(230,244,255,.4); } }

/* nieve */
.fx-snow i { top: -5%; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.7); animation: snow-fall linear infinite; }
@keyframes snow-fall { 0% { transform: translate(0, 0); } 25% { transform: translate(18px, 25vh); } 50% { transform: translate(-10px, 50vh); } 75% { transform: translate(14px, 75vh); } 100% { transform: translate(0, 105vh); } }
.fx-snow { contain: strict; }
.fx-frost { top: auto; height: 46px; background: linear-gradient(to top, rgba(255,255,255,.28), rgba(255,255,255,0)); }

/* nubes que pasan */
.fx-clouds i { left: -40%; border-radius: 999px; filter: blur(18px); background: rgba(255,255,255,.12); animation: cloud-pass linear infinite; }
.hq.wx-cloud .fx-clouds i { background: rgba(255,255,255,.16); }
@keyframes cloud-pass { from { transform: translateX(0); } to { transform: translateX(260%); } }
/* neblina */
.fx-fog i { left: -50%; width: 200%; height: 40%; border-radius: 50%; filter: blur(24px); background: rgba(255,255,255,.14); animation: fog-drift 26s ease-in-out infinite alternate; }
.fx-fog i:nth-child(1) { top: 10%; } .fx-fog i:nth-child(2) { top: 40%; animation-delay: -9s; } .fx-fog i:nth-child(3) { top: 68%; animation-delay: -17s; }
@keyframes fog-drift { from { transform: translateX(-8%); } to { transform: translateX(8%); } }

/* sol */
.fx-sun .sun-core { right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,250,220,.95) 0 12%, rgba(255,226,140,.55) 28%, rgba(255,214,110,.18) 50%, rgba(255,214,110,0) 70%); }
.fx-sun .sun-rays { right: -380px; top: -400px; width: 900px; height: 900px; border-radius: 50%; opacity: .32;
  background: repeating-conic-gradient(from 0deg, rgba(255,246,200,.55) 0deg 4deg, rgba(255,246,200,0) 4deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0 12%, rgba(0,0,0,.6) 30%, transparent 62%); mask: radial-gradient(circle, #000 0 12%, rgba(0,0,0,.6) 30%, transparent 62%);
  animation: rays-spin 90s linear infinite; }
.fx-sun .sun-flare { right: 30%; top: 38%; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.22), rgba(255,255,255,0) 70%); }
@keyframes rays-spin { to { transform: rotate(360deg); } }

/* noche: estrellas que titilan y fugaces */
.fx-stars i { border-radius: 50%; background: #fff; box-shadow: 0 0 4px rgba(255,255,255,.8); animation: twinkle ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
.fx-shoot i { width: 130px; height: 1.6px; border-radius: 2px; opacity: 0; transform: rotate(-24deg);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.95)); box-shadow: 0 0 8px rgba(255,255,255,.7); animation: shoot ease-out infinite; }
.fx-shoot i::after { content: ""; position: absolute; right: -2px; top: -1.5px; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 2px rgba(255,255,255,.9); }
@keyframes shoot { 0%, 88% { opacity: 0; transform: translate(0, 0) rotate(-24deg); } 89% { opacity: 1; } 96% { opacity: .9; } 100% { opacity: 0; transform: translate(-340px, 150px) rotate(-24deg); } }

@media (prefers-reduced-motion: reduce) {
  .fx-layer i, .fx-flash, .fx-sun .sun-rays { animation: none !important; }
  .fx-rain, .fx-splash, .fx-shoot { display: none; }
}
/* contraste en climas claros */
.hq.wx-sun.sky-day { background: linear-gradient(160deg, #18609c 0%, #2f86bd 50%, #4fa6cf 100%); }
.hq.wx-snow.sky-day { background: linear-gradient(165deg, #2f4b6c 0%, #557497 55%, #7f9bb9 100%); }
.hq.wx-sun .wx-place, .hq.wx-snow .wx-place { background: rgba(6, 30, 60, .32); color: #fff; }
.hq.wx-sun .wx-chip, .hq.wx-snow .wx-chip, .hq.wx-sun .wx-day.is-today, .hq.wx-snow .wx-day.is-today { background: rgba(6, 30, 60, .2); }
.hq.wx-sun .wx-chip small, .hq.wx-snow .wx-chip small, .hq.wx-sun .wx-day small, .hq.wx-snow .wx-day small,
.hq.wx-sun .wx-day span, .hq.wx-snow .wx-day span, .hq.wx-sun .tl-tick span, .hq.wx-snow .tl-tick span { color: #eef6fb; }
.hq.wx-sun .hq-wx, .hq.wx-snow .hq-wx { background: linear-gradient(160deg, rgba(6,30,60,.28), rgba(6,30,60,.14) 70%); border-color: rgba(255,255,255,.28); }
.hq.wx-sun .hq-alert, .hq.wx-snow .hq-alert { background: rgba(6, 30, 60, .22); }
.hq.wx-sun .hq-alert a, .hq.wx-snow .hq-alert a, .hq.wx-sun .hq-empty .link, .hq.wx-snow .hq-empty .link { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.fx-sun .sun-core { right: -110px; top: -130px; }
/* lluvia un poco más visible */
.fx-rain.near i { width: 1.8px; height: 26px; background: linear-gradient(rgba(215, 235, 255, 0), rgba(225, 240, 255, 1)); }
/* estrella fugaz: la cabeza brillante va adelante (hacia donde se mueve) y la estela atrás */
.fx-shoot i { background: linear-gradient(90deg, rgba(255,255,255,.95), rgba(255,255,255,0)); }
.fx-shoot i::after { right: auto; left: -2px; }

/* ======================= Inicio compacto ======================= */
.hq { padding: 18px 20px 6px; border-radius: 20px; margin-bottom: 14px; }
.hq-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); gap: 18px; }
.hq-date { font-size: 12px; }
.hq-title { font-size: 25px; margin: 2px 0 4px; letter-spacing: -.4px; }
.hq-sub { font-size: 13.5px; }
.hq-actions { margin-top: 12px; gap: 8px; }
.hq-btn { min-height: 34px; padding: 0 13px 0 11px; font-size: 13px; gap: 6px; }
.hq-btn b { font-size: 14px; }
/* clima más chico: ahora + datos en una fila, y 3 días en línea */
.hq-wx { padding: 11px 13px 10px; gap: 9px; border-radius: 16px; }
.wx-now { gap: 9px; }
.hq-wx .wx-big { width: 40px; height: 40px; }
.wx-temp strong { font-size: 28px; letter-spacing: -1px; }
.wx-temp sup { font-size: 12px; vertical-align: 12px; }
.wx-temp span { font-size: 12px; margin-top: 1px; }
.wx-place { font-size: 10.5px; padding: 3px 8px; }
.wx-chips { gap: 4px; }
.wx-chip { padding: 4px 4px; border-radius: 9px; }
.wx-chip small { font-size: 9px; }
.wx-chip b { font-size: 12px; }
.wx-days { padding-top: 8px; gap: 4px; }
.wx-day { grid-template-columns: auto auto auto; align-items: center; justify-content: center; gap: 4px; padding: 3px 0; border-radius: 9px; }
.wx-day small { font-size: 10.5px; }
.wx-day .wx { width: 18px; height: 18px; }
.wx-day span { font-size: 11px; }
.hq-wx.is-loading { min-height: 128px; }
.sk-a { height: 40px; } .sk-b { height: 30px; } .sk-c { height: 26px; }
/* línea del día y lista más ajustadas */
.tl { margin: 36px 6px 0; }
.tl-wx { top: -27px; }
.tl-wx-h { padding: 1px 6px 1px 2px; }
.tl-wx-h .wx { width: 17px; height: 17px; }
.tl-wx-h b { font-size: 10.5px; }
.tl-tick span { font-size: 10px; top: 9px; }
.tl-job { width: 14px; height: 14px; margin-left: -7px; bottom: -8px; border-width: 2px; }
.tl-sun { width: 13px; height: 13px; margin-left: -6.5px; top: -1px; }
.hq-list { margin: 22px 0 4px; }
.hq-list button { padding: 7px 8px; grid-template-columns: 72px 1fr auto; font-size: 13.5px; }
.hq-who span { font-size: 12px; }
.hq-state { font-size: 11px; padding: 2px 8px; }
.hq-empty { margin: 22px 0 10px; font-size: 13px; }
/* avisos en una línea compacta */
.hq-alerts { gap: 5px; margin: 2px 0 12px; }
.hq-alert { padding: 6px 10px; gap: 8px; font-size: 12.5px; border-radius: 10px; }
.hq-alert .wx { width: 20px; height: 20px; }
/* números más bajos */
.kpis { gap: 10px; margin-bottom: 14px; }
.kpi { padding: 12px 14px; }
.kpi span { font-size: 12px; }
.kpi strong { font-size: 22px; margin-top: 2px; }
.kpi em { font-size: 11.5px; }
@media (max-width: 900px) { .hq-grid { grid-template-columns: 1fr; gap: 12px; } }
@media (max-width: 640px) {
  .hq { padding: 14px 12px 4px; border-radius: 16px; }
  .hq-title { font-size: 21px; }
  .wx-temp strong { font-size: 26px; }
  .tl { margin: 34px 2px 0; }
  .hq-list button { grid-template-columns: 62px 1fr; }
  .hq-alert a { padding-left: 28px; }
}
.wx-day span { white-space: nowrap; }
.attn-panel { padding: 12px 16px; }
.attn-panel h3 { font-size: 14px; margin-bottom: 4px; }
.attn li { padding: 6px 0; font-size: 13.5px; }
.attn-ico { width: 18px; height: 18px; font-size: 11px; }

/* tarjeta "preparar base" (solo Desarrollador) */
.setup-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin: 0 0 14px; padding: 16px 18px;
  border-radius: 16px; background: linear-gradient(135deg, #ffffff, #eff7fa); border: 1px solid #cfe6ee; box-shadow: 0 10px 30px -22px rgba(10,33,57,.45); }
.setup-ico { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--green), #3a88a5); display: grid; align-content: center; gap: 3px; padding: 0 11px; }
.setup-ico span { display: block; height: 4px; border-radius: 3px; background: rgba(255,255,255,.9); }
.setup-ico span:nth-child(2) { width: 75%; } .setup-ico span:nth-child(3) { width: 55%; }
.setup-txt h3 { margin: 0 0 2px; font-size: 15px; color: var(--ink); }
.setup-txt p { margin: 0; font-size: 13px; color: var(--ink-2); }
.setup-status:empty { display: none; }
.setup-status { margin-top: 6px !important; font-weight: 600; color: var(--green) !important; }
.setup-card.is-busy .setup-ico span { animation: sk 1.2s ease-in-out infinite; background: linear-gradient(90deg, rgba(255,255,255,.5), #fff, rgba(255,255,255,.5)); background-size: 200% 100%; }
.setup-card.is-done { border-color: var(--green-2); }
.setup-card.is-done .setup-act { display: none; }
@media (max-width: 640px) { .setup-card { grid-template-columns: auto 1fr; } .setup-act { grid-column: 1 / -1; } .setup-act .btn { width: 100%; justify-content: center; } }

/* ======================= Calendario del Inicio ======================= */
.cal-top { align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 8px; }
.cal-top h3 { margin: 0; margin-right: auto; }
.cal-nav { display: flex; align-items: center; gap: 2px; }
.cal-nav .icon { font-size: 20px; line-height: 1; padding: 2px 8px; color: var(--ink-2); }
.cal-nav .link { font-size: 12.5px; color: var(--green); font-weight: 600; padding: 0 4px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: #edf1f3; }
.seg button { border: 0; background: none; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(10,33,57,.12); }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head span { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 2px 0 4px; }
.cal-day { position: relative; min-height: 50px; border: 0; border-radius: 10px; background: #f6f8f9; padding: 5px 6px; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; transition: background .15s, transform .15s; }
.cal-day:hover { background: #e9f1f4; transform: translateY(-1px); }
.cal-day.out { background: transparent; }
.cal-day.out .cal-n { color: #b8c4cc; }
.cal-day.today { background: var(--green-soft); box-shadow: inset 0 0 0 2px var(--green-2); }
.cal-day.today .cal-n { color: var(--green); }
.cal-day.has { background: #eef4f6; }
.cal-n { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.cal-jobs { display: flex; align-items: center; gap: 5px; }
.cal-jobs b { font-size: 11px; color: var(--ink-2); }
.cal-dots { display: flex; gap: 2px; }
.cal-dots i, .cal-legend i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: #8aa9c2; }
.cal-dots i.s-Done, .cal-legend i.s-Done { background: var(--green); }
.cal-dots i.s-In-progress { background: #e7a92b; }
.cal-walk, .cal-legend i.walk { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg); background: var(--violet); }
.cal-legend { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.cal-legend i { margin-left: 6px; }
.cal-legend i.walk { position: static; border-radius: 1px; }
button.wk-day { border: 0; background: none; cursor: pointer; font: inherit; }
@media (max-width: 640px) { .cal-day { min-height: 40px; padding: 4px; } .cal-jobs b { display: none; } }

/* ======================= Alertas de leads nuevos ======================= */
.alerts { position: fixed; top: 16px; right: 16px; z-index: 70; display: grid; gap: 10px; width: min(380px, calc(100% - 32px)); pointer-events: none; }
.lead-alert { pointer-events: auto; display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; padding: 14px 14px 12px; border-radius: 16px; color: #fff;
  background: linear-gradient(140deg, #0d2b47, #134a5e); border: 1px solid rgba(158,230,246,.35);
  box-shadow: 0 18px 40px -16px rgba(6,26,42,.6), 0 0 0 4px rgba(62,212,239,.18); animation: la-in .45s cubic-bezier(.2,.9,.3,1.2) both; }
.lead-alert.out { animation: la-out .25s ease both; }
@keyframes la-in { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes la-out { to { opacity: 0; transform: translateX(40px); } }
.la-bell { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: rgba(158,230,246,.18);
  animation: bell 1.6s ease-in-out 3; transform-origin: 50% 10%; }
@keyframes bell { 0%, 50%, 100% { transform: rotate(0); } 10% { transform: rotate(16deg); } 20% { transform: rotate(-14deg); } 30% { transform: rotate(10deg); } 40% { transform: rotate(-6deg); } }
.la-body { min-width: 0; }
.la-body small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9ee6f6; }
.la-body strong { display: block; font-size: 15px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.la-body strong span { font-weight: 500; color: #cddbe6; }
.la-body p { margin: 2px 0 0; font-size: 12.5px; color: #cddbe6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.la-act { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.la-btn { border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 13px; cursor: pointer; }
.la-btn:hover { background: rgba(255,255,255,.14); }
.la-btn.primary { background: linear-gradient(135deg, #7fe4f5, #1fb6e0); border-color: transparent; color: #04213a; }
.lead-alert.more { grid-template-columns: 1fr auto; align-items: center; padding: 10px 14px; font-size: 13.5px; }

/* banner en el Inicio */
.lead-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border-radius: 16px;
  background: linear-gradient(120deg, #e3f2f7, #f2f9fb); border: 1px solid #bfdee9; box-shadow: 0 0 0 0 rgba(62,212,239,.55); animation: lb-glow 2.4s ease-out 3; }
@keyframes lb-glow { 0% { box-shadow: 0 0 0 0 rgba(62,212,239,.55); } 100% { box-shadow: 0 0 0 12px rgba(62,212,239,0); } }
.lb-bell { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: #fff; box-shadow: 0 2px 8px rgba(10,33,57,.08);
  animation: bell 1.6s ease-in-out 3; transform-origin: 50% 10%; }
.lead-banner > div { flex: 1; min-width: 0; }
.lead-banner strong { display: block; color: var(--ink); font-size: 14.5px; }
.lead-banner span { display: block; color: var(--ink-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-banner .link { color: var(--green); font-size: 12.5px; white-space: nowrap; }

/* el número de Leads del menú late cuando hay sin ver */
.badge.ping { animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(62,212,239,.7); } 100% { box-shadow: 0 0 0 9px rgba(62,212,239,0); } }

@media (max-width: 640px) {
  .alerts { top: auto; bottom: 76px; right: 12px; left: 12px; width: auto; }
  .lead-banner { flex-wrap: wrap; }
  .lead-banner .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .la-bell, .lb-bell, .badge.ping, .lead-banner { animation: none; } }

/* ======================= Resumen ======================= */
.summary { display: grid; gap: 14px; }
.sum-hero { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.sum-hero h3 { margin: 0; font-size: 20px; letter-spacing: -.3px; }
.sum-hero p { margin: 2px 0 0; color: var(--ink-2); }
.sum-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact { background: var(--bg); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.fact small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.fact span { display: block; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; text-align: center; }
.stat small { display: block; font-size: 11px; color: var(--muted); }
.stat b { font-size: 16px; }
.stat.warn b { color: var(--amber); }
.sum-btn { position: absolute; top: 6px; right: 6px; border: 0; background: rgba(10,33,57,.05); width: 26px; height: 26px; border-radius: 8px; cursor: pointer; font-size: 13px; opacity: .7; }
.sum-btn:hover { opacity: 1; background: var(--green-soft); }
.card { position: relative; padding-right: 36px; }
.name-cell { display: flex; align-items: center; gap: 8px; }
.name-cell .sum-btn { position: static; width: 24px; height: 24px; font-size: 12px; }

/* bloque de la propiedad */
.prop { border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 8px; background: linear-gradient(180deg, #fff, #f7fafb); }
.prop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.prop-head h4 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.prop-sqft { font-weight: 800; color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.prop-addr { margin: 0; font-size: 13.5px; color: var(--ink); font-weight: 600; }
.prop-map { position: relative; height: 190px; border: 0; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer; background: #1d2b36; display: block; width: 100%; }
.prop-map-tiles { position: absolute; inset: 0; }
.prop-map.is-loading { background: linear-gradient(90deg, #22323f, #2e4252, #22323f); background-size: 200% 100%; animation: sk 1.4s ease-in-out infinite; }
.prop-map.is-error { cursor: default; background: #eef2f5; }
.prop-map.is-error .prop-map-cta { background: none; color: var(--muted); box-shadow: none; }
.prop-map-cta { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 500; white-space: nowrap; font-weight: 700; font-size: 13px; color: var(--ink);
  background: rgba(255,255,255,.95); padding: 7px 14px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.prop-map:hover .prop-map-cta { background: #fff; }
.prop-approx { position: absolute; top: 8px; left: 8px; z-index: 500; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.5); padding: 3px 8px; border-radius: 999px; }
.prop-links { display: flex; flex-wrap: wrap; gap: 6px; }
.prop-links .btn { text-decoration: none; color: var(--ink); }

/* ======================= Visor de la propiedad ======================= */
body.pv-open { overflow: hidden; }
.pv-back { position: fixed; inset: 0; z-index: 80; background: rgba(6,26,42,.6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 18px; }
.pv { width: min(1200px, 100%); height: min(820px, 100%); background: #0b1d30; color: #fff; border-radius: 20px; overflow: hidden; display: grid; grid-template-rows: auto 1fr;
  box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.pv-head { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.08); flex-wrap: wrap; }
.pv-ttl { flex: 1; min-width: 200px; }
.pv-ttl strong { display: block; font-size: 16px; }
.pv-ttl span { display: block; font-size: 12.5px; color: #a8bccb; }
.pv-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pv-links a { color: #dfeff5; text-decoration: none; font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.pv-links a:hover { background: rgba(255,255,255,.16); }
.pv-x { border: 0; background: rgba(255,255,255,.1); color: #fff; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px; }
.pv-body { display: grid; grid-template-columns: 1fr 300px; min-height: 0; }
.pv-map { min-height: 0; background: #1d2b36; }
.pv-map.is-measuring { cursor: crosshair; }
.pv-tools { padding: 16px; display: grid; gap: 12px; align-content: start; overflow-y: auto; background: linear-gradient(180deg, #0f2740, #0b1d30); }
.pv-note { margin: 0; font-size: 12.5px; background: rgba(240,180,41,.15); color: #ffe2a6; padding: 8px 10px; border-radius: 10px; }
.pv-help { font-size: 13px; color: #cddbe6; }
.pv-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pv-btns .btn:not(.primary) { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.14); }
.pv-res { display: grid; gap: 8px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 12px; }
.pv-res small { display: block; font-size: 11px; color: #9fb4c5; text-transform: uppercase; letter-spacing: .06em; }
.pv-res b { font-size: 18px; }
.pv-total b { font-size: 26px; color: #7fe4f5; }
.pv-floors { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #cddbe6; font-size: 13px; }
.pv-floors input { width: 72px; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; text-align: center; }
.pv-save { justify-content: center; }
.pv-saved { margin: 0; color: #7fe4f5; font-weight: 600; font-size: 13px; }
.pv-disc { margin: 0; font-size: 11.5px; color: #8aa0b2; }
.pv-pt { background: #fff; border: 3px solid #0a6fb0; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.pv .leaflet-control-attribution { font-size: 9px; }
@media (max-width: 760px) {
  .pv-back { padding: 0; }
  .pv { border-radius: 0; height: 100%; }
  .pv-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .pv-tools { max-height: 45vh; }
  .facts, .stats { grid-template-columns: 1fr 1fr; }
}

/* ======================= Cotizaciones ======================= */
.q-bar { margin: 0 0 12px; }
.q-tabs { flex-wrap: wrap; }
.drawer.open ~ .alerts { right: calc(min(480px, 100%) + 16px); }
@media (max-width: 860px) { .drawer.open ~ .alerts { display: none; } }
.quick a.btn { color: var(--ink); text-decoration: none; }
/* botones en las tarjetas de Leads */
.card { padding-right: 12px; }
.card-acts { display: flex; gap: 5px; margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); }
.card-acts button, .card-acts a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--line); background: #fff;
  border-radius: 8px; padding: 5px 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-decoration: none; white-space: nowrap; }
.card-acts a { flex: 0 0 34px; }
.card-acts button:hover, .card-acts a:hover { background: var(--green-soft); border-color: #bfdee9; color: var(--ink); }
.card-acts .q { color: var(--green); border-color: #cfe6ee; }

/* ======================= Documentos (sencillo) ======================= */
.doc-drop { display: grid; justify-items: center; gap: 2px; padding: 20px 12px; border: 2px dashed #cfdee3; border-radius: 14px; background: #f7fafb; cursor: pointer; text-align: center; transition: background .15s, border-color .15s; }
.doc-drop.over, .doc-drop:hover { background: var(--green-soft); border-color: var(--green-2); }
.doc-drop-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-size: 18px; margin-bottom: 4px; }
.doc-drop b { color: var(--ink); }
.doc-drop small { color: var(--muted); font-weight: 500; }
.doc-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 860px) {
  nav { grid-auto-columns: minmax(64px, 1fr); overflow-x: auto; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
}

/* Leads nuevos dentro de "Últimos leads" (sin tarjetas flotantes) */
.panel.has-unseen { box-shadow: 0 0 0 2px rgba(62,212,239,.55), var(--shadow); }
.lr-count { margin-left: 8px; font-size: 12px; font-weight: 700; color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 2px 9px; vertical-align: 2px; }
.lead-row { align-items: start; }
.lead-row .lr-main { min-width: 0; }
.lead-row .lr-biz { font-weight: 500; color: var(--ink-2); }
.lead-row.unseen { background: linear-gradient(90deg, #eaf4f8, #f7fbfc); border-radius: 12px; border-top-color: transparent; padding: 10px; margin: 2px 0; }
.lead-row.unseen + .lead-row { border-top-color: transparent; }
.lr-bell { display: inline-block; margin-right: 6px; animation: bell 1.6s ease-in-out 3; transform-origin: 50% 10%; }
.lr-new { font-weight: 800; letter-spacing: .06em; animation: ping 1.8s ease-out 4; }
.lr-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.lr-acts button { border: 1px solid #cfe6ee; background: #fff; border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.lr-acts button:hover { background: var(--green-soft); color: var(--ink); }
.lr-acts .q { color: var(--green); }
.has-unseen .p-head .link { color: var(--green); font-weight: 600; font-size: 13px; }

/* ---------- Documentos ---------- */
.ic { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; }
.ic svg { width: 100%; height: 100%; display: block; }
.btn .ic { width: 16px; height: 16px; }
.t-blue   { --tc: var(--blue);   --tb: var(--blue-soft); }
.t-violet { --tc: var(--violet); --tb: var(--violet-soft); }
.t-green  { --tc: var(--green);  --tb: var(--green-soft); }
.t-amber  { --tc: var(--amber);  --tb: var(--amber-soft); }
.t-red    { --tc: var(--red);    --tb: var(--red-soft); }
.t-gray   { --tc: var(--ink-2);  --tb: #edf1f4; }
.fbadge { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; flex: none; color: var(--tc); background: var(--tb); }
.fbadge .ic { width: 19px; height: 19px; }
.fbadge.sm { width: 22px; height: 22px; border-radius: 7px; }
.fbadge.sm .ic { width: 13px; height: 13px; }
.fbadge.xs { width: 18px; height: 18px; border-radius: 5px; }
.fbadge.xs .ic { width: 11px; height: 11px; }

/* Tarjeta de subir: 1 carpeta · 2 servicio · 3 archivos */
.up-card { padding: 20px 22px 18px; }
.up-step { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.up-step:first-child { margin-top: 0; }
.up-step h3 { margin: 0; font-size: 15px; }
.up-n { width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--green); flex: none; }
.up-opt { font-size: 12px; color: var(--muted); }
.up-step-row .up-svc { margin-left: auto; width: auto; min-width: 230px; padding: 7px 10px; font-size: 13.5px; }
.ftiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 8px; }
.ftile { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-align: left; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); transition: border-color .15s, box-shadow .15s, transform .15s, background .15s; }
.ftile:hover { border-color: #c9d8dd; box-shadow: 0 2px 10px rgba(10,33,57,.07); transform: translateY(-1px); }
.ftile:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(62,212,239,.4); }
.ftile.on { border-color: var(--green); background: #f4f9fb; box-shadow: 0 0 0 3px rgba(10,111,176,.12); }
.ftile-txt { min-width: 0; padding-right: 14px; }
.ftile-txt strong { display: block; font-size: 13.5px; line-height: 1.25; }
.ftile-txt small { display: block; font-size: 11.5px; color: var(--muted); }
.ftile-check { position: absolute; top: 7px; right: 7px; width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center;
  color: #fff; background: var(--green); opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.ftile-check .ic { width: 11px; height: 11px; }
.ftile.on .ftile-check { opacity: 1; transform: none; }
.dropzone { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 14px; cursor: pointer;
  background: #fafcfd; border: 2px dashed #c9dbe2; transition: background .15s, border-color .15s, box-shadow .15s; }
.dropzone:hover, .dropzone:focus-visible { background: #f3f8fa; border-color: var(--green-2); outline: none; }
.dropzone.over { background: #eaf4f7; border-color: var(--green); border-style: solid; box-shadow: 0 0 0 5px rgba(62,212,239,.2); }
.drop-ico { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--green), #3a88a5);
  box-shadow: 0 6px 16px rgba(10,111,176,.25); transition: transform .2s; }
.drop-ico .ic { width: 26px; height: 26px; }
.dropzone.over .drop-ico { transform: translateY(-3px) scale(1.05); }
.drop-txt strong { display: block; font-size: 15.5px; }
.drop-hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.drop-hint b { color: var(--green); }
.drop-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.up-queue { display: grid; gap: 6px; margin-top: 12px; }
.up-queue:empty { display: none; }
.uq { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.uq-thumb { width: 40px; height: 40px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; background: var(--bg); }
.uq-thumb img { width: 100%; height: 100%; object-fit: cover; }
.uq-main { min-width: 0; }
.uq-main strong { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uq-main small { font-size: 11.5px; color: var(--muted); }
.uq-bar { display: block; height: 4px; margin-top: 5px; border-radius: 999px; background: #edf1f2; overflow: hidden; }
.uq-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--green-2); transition: width .4s; }
.uq.busy .uq-bar i { width: 40%; animation: uqslide 1.1s ease-in-out infinite; }
.uq.ok .uq-bar i { width: 100%; background: var(--green); animation: none; }
.uq.err .uq-bar i { width: 100%; background: var(--red); animation: none; }
@keyframes uqslide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .uq.busy .uq-bar i { animation: none; width: 60%; } }
.uq-st { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.uq-st .ic { width: 15px; height: 15px; }
.uq.ok .uq-st { color: var(--green); font-weight: 600; }
.uq.err .uq-st { color: var(--red); white-space: normal; text-align: right; max-width: 220px; }

/* Lista */
.doc-filter { width: auto; padding: 6px 10px; font-size: 13px; }
.doc-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.fchips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 4px; scrollbar-width: thin; }
.fchip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 6px; border-radius: 999px; white-space: nowrap; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--ink-2); background: #fff; border: 1px solid var(--line); transition: background .15s, border-color .15s; }
.fchip > .ic { width: 22px; height: 16px; color: var(--ink-2); }
.fchip:hover { border-color: #c9d8dd; background: #f9fbfc; }
.fchip b { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 0 7px; }
.fchip.on { color: #fff; background: var(--navy); border-color: var(--navy); }
.fchip.on > .ic { color: #fff; }
.fchip.on b { color: var(--navy); background: #fff; }
.drow { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 12px; align-items: center; padding: 9px 4px; border-top: 1px solid var(--line); cursor: pointer; }
.drow:first-child { border-top: 0; }
.drow:hover { background: #f9fbfc; }
.drow-ico { width: 44px; height: 44px; border-radius: 11px; background: var(--bg); display: grid; place-items: center; overflow: hidden; }
.drow-ico img { width: 100%; height: 100%; object-fit: cover; }
.drow-ico .fbadge { width: 44px; height: 44px; border-radius: 11px; }
.drow-main { min-width: 0; }
.drow-main strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow-main small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow-folder { display: inline-flex; align-items: center; gap: 5px; vertical-align: -4px; }
.drow-more { padding: 4px 10px; font-size: 15px; line-height: 1; }
.ftype { position: relative; width: 100%; height: 100%; display: grid; place-items: center; color: var(--tc); background: var(--tb); }
.ftype .ic { width: 20px; height: 20px; margin-top: -6px; }
.ftype b { position: absolute; bottom: 4px; font-size: 8.5px; font-weight: 800; letter-spacing: .04em; }
.t-ico { display: flex; align-items: center; gap: 8px; }
.t-ico .ftype { width: 26px; height: 26px; border-radius: 7px; flex: none; }
.t-ico .ftype .ic { width: 14px; height: 14px; margin: 0; }
.t-ico .ftype b { display: none; }
.dgroup + .dgroup { margin-top: 10px; }
.dgroup-h { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 2px; padding: 7px 10px; border-radius: 10px;
  background: var(--bg); font-size: 13px; color: var(--ink); }
.dgroup-h > span { display: inline-flex; align-items: center; gap: 7px; }
.dgroup-h > span .ic { width: 15px; height: 15px; color: var(--green); }
.dgroup-h b { font-size: 11.5px; color: var(--muted); background: #fff; border-radius: 999px; padding: 1px 8px; }
.dgroup .drow:first-of-type { border-top: 0; }
.doc-drop-ico .ic { width: 24px; height: 24px; }
@media (max-width: 760px) {
  .up-card { padding: 16px; }
  .ftiles { grid-template-columns: 1fr 1fr; gap: 6px; }
  .ftile { padding: 9px 10px; gap: 8px; }
  .ftile .fbadge { width: 30px; height: 30px; }
  .ftile-txt strong { font-size: 12.5px; }
  .up-step-row { flex-wrap: wrap; }
  .up-step-row .up-svc { margin-left: 0; width: 100%; min-width: 0; }
  .dropzone { grid-template-columns: auto 1fr; padding: 16px; }
  .drop-btns { grid-column: 1 / -1; justify-content: stretch; }
  .drop-btns .btn { flex: 1; justify-content: center; white-space: nowrap; padding: 10px 12px; }
  .drow { grid-template-columns: 44px 1fr auto; }
  .drow .btn:not(.drow-more) { display: none; }
}

/* Cotizaciones: nombre + estado del lead */
.q-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.q-name .pill { font-size: 11px; padding: 1px 8px; }
.q-new { box-shadow: 0 0 0 3px rgba(62,212,239,.25); }

/* Cotización: servicio en tarjetas con ícono (estilo booking North Crescent, colores Wadimisa) */
.svc-pick { display: grid; gap: 6px; }
.svc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.svc-grp { margin-top: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.svc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.svc-grid > .svc-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.svc-card { position: relative; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 34px 10px 12px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--line); background: linear-gradient(145deg, #fff, #f7fafd); color: var(--ink); font-weight: 600; font-size: 13px; line-height: 1.3;
  box-shadow: 0 2px 5px rgba(11,45,72,.03); -webkit-tap-highlight-color: transparent;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .2s, background .25s, color .2s, box-shadow .25s; }
.svc-card input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.svc-ico { flex: 0 0 26px; width: 26px; height: 26px; color: var(--navy); transition: color .2s, transform .3s cubic-bezier(.2,.8,.2,1); }
.svc-ico svg { width: 100%; height: 100%; display: block; }
.svc-name { min-width: 0; }
.svc-check { position: absolute; top: 9px; right: 9px; width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid #b7c8d5; background: #fff;
  transition: background .2s, border-color .2s, transform .3s cubic-bezier(.3,1.6,.5,1); }
.svc-check::after { content: ""; position: absolute; top: 4px; left: 4.5px; width: 7.5px; height: 4px; border-bottom: 2px solid #fff; border-left: 2px solid #fff;
  opacity: 0; transform: rotate(-45deg) scale(.4); transition: opacity .2s, transform .3s cubic-bezier(.3,1.6,.5,1); }
@media (hover: hover) and (pointer: fine) {
  .svc-card:hover { transform: translateY(-2px); border-color: var(--green-2); box-shadow: 0 6px 14px rgba(11,45,72,.06), 0 10px 22px rgba(10,111,176,.1); }
  .svc-card:hover .svc-ico { transform: scale(1.08); }
}
.svc-card:has(input:checked) { color: #fff; border-color: var(--navy); background: linear-gradient(145deg, #14609e 0%, var(--navy) 60%, #072b4f 100%);
  box-shadow: 0 0 0 3px rgba(62,212,239,.3), 0 10px 22px rgba(18,81,130,.25); }
.svc-card:has(input:checked) .svc-ico { color: var(--green-2); }
.svc-card:has(input:checked) .svc-check { border-color: var(--green-2); background: var(--green); transform: scale(1.08); }
.svc-card:has(input:checked) .svc-check::after { opacity: 1; transform: rotate(-45deg) scale(1); }
.svc-card:has(input:focus-visible) { outline: 3px solid rgba(62,212,239,.6); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .svc-card, .svc-ico, .svc-check, .svc-check::after { transition: none; } }

/* Cotización en pantalla completa */
.drawer.full { width: 100%; box-shadow: none; }
.drawer.full header { padding: 14px 28px; background: var(--navy); color: #fff; border-bottom: 0; }
.drawer.full header h2 { font-size: 18px; }
.drawer.full header .icon { color: #fff; }
.drawer.full .drawer-body { padding: 0; background: var(--bg); flex: 1; }
.drawer.full ~ .alerts { display: none; }
.q-full { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 28px 40px; align-items: start; }
.q-side { position: sticky; top: 24px; display: grid; gap: 12px; padding: 18px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
.q-who strong { display: block; font-size: 18px; letter-spacing: -.01em; }
.q-who span { font-size: 13px; color: var(--muted); }
.q-side .facts { grid-template-columns: 1fr 1fr; }
.q-main { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 22px 24px; }
.q-main .form-grid { gap: 14px 16px; }
.drawer.full .svc-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.drawer.full .svc-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1180px) { .drawer.full .svc-grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.drawer.full .svc-grid > .svc-card:last-child:nth-child(odd) { grid-column: auto; }
.drawer.full .svc-card { min-height: 66px; font-size: 13.5px; }
.drawer.full .q-main .actions { position: sticky; bottom: -1px; margin: 4px -24px -22px; padding: 14px 24px; background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; backdrop-filter: blur(6px); }
.q-live { display: grid; gap: 8px; padding: 14px; border-radius: 14px; color: #fff; background: linear-gradient(145deg, #14609e, var(--navy) 60%, #072b4f); }
.q-live-amt small { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--green-2); font-weight: 700; }
.q-live-amt strong { font-size: 30px; letter-spacing: -.02em; }
.q-live-amt span { display: block; font-size: 13px; color: #c9dff0; }
.q-live-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.14); color: #c9dff0; }
.q-live-row b { color: #fff; text-align: right; }
@media (max-width: 900px) {
  .q-full { grid-template-columns: 1fr; padding: 14px 12px 28px; gap: 14px; }
  .q-side { position: static; }
  .drawer.full header { padding: 12px 16px; }
  .q-main { padding: 16px; }
  .drawer.full .q-main .actions { margin: 4px -16px -16px; padding: 12px 16px; }
  .drawer.full .svc-grid.g4, .drawer.full .svc-grid.g3 { grid-template-columns: 1fr 1fr; }
}

/* Cotizador: líneas de servicio, descuento e impuesto */
.q-form > label, .q-form .q-sec { min-width: 0; }
.q-sec { display: grid; gap: 10px; padding-top: 6px; }
.q-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.q-sec-h h3 { margin: 0; font-size: 15px; }
.q-sec .s { margin: -4px 0 0; }
.ql-list { display: grid; gap: 10px; }
.ql { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fafcfd; }
.ql-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ql-n { width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--navy); flex: none; }
.ql-top select { flex: 1; min-width: 180px; width: auto; }
.ql-del { margin-left: auto; }
.ql-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ql-grid label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ql-fixed { grid-template-columns: minmax(0, 220px); }
.ql[data-mode="hours"] .ql-fixed, .ql[data-mode="fixed"] .ql-hours { display: none; }
.ql-foot { display: flex; align-items: center; gap: 12px; }
.ql-foot input { flex: 1; }
.ql-amt { font-size: 16px; color: var(--navy); white-space: nowrap; }
.chips-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }
.chip-pick { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.chip-pick:hover { border-color: var(--green-2); color: var(--green); }
.q-live-row.disc b { color: var(--green-2); }
.q-live-row.strong { color: #fff; font-weight: 600; }
.q-live-row.strong b { font-size: 15px; }
@media (max-width: 900px) {
  .ql-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ql-top select { min-width: 0; width: 100%; flex-basis: 100%; order: 3; }
}
.ql input.bad { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,67,58,.15); }
.q-disc { display: grid; gap: 6px; align-content: start; }
.q-lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.q-disc-seg { display: flex; flex-wrap: wrap; width: fit-content; }
.q-disc-seg button { padding: 7px 14px; font-size: 13px; }
.q-disc-seg button.on { background: var(--navy); color: #fff; }

/* Vista previa de la cotización (lo que ve el cliente) */
.qp-back { position: fixed; inset: 0; z-index: 70; background: rgba(8,31,48,.62); overflow-y: auto; padding: 0 16px 40px; }
.qp-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 -16px 22px; padding: 12px max(20px, calc((100% - 860px) / 2 + 16px)); color: #fff; background: #072b4f; box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.qp-bar .btn:not(.primary) { color: var(--ink); }
.qp-bar-btns { display: flex; gap: 8px; }
@media print {
  @page { size: letter; margin: 12mm; }
  html:has(body.qp-printing), body.qp-printing { background: #fff; }
  body.qp-printing > *:not(.qp-back) { display: none !important; }
  body.qp-printing .qp-back { position: static; background: none; padding: 0; overflow: visible; }
  body.qp-printing .qp-bar { display: none; }
}

/* textos en el cotizador */
.q-texts > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.q-texts .s code { margin: 0 3px; padding: 1px 5px; border-radius: 5px; background: var(--green-soft); font-size: 12px; }
.q-texts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 10px 0 12px; }
.q-texts-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .q-texts-grid { grid-template-columns: 1fr; } }

/* Instalar la app */
.install-btn { margin: 0 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(62,212,239,.45); background: rgba(62,212,239,.12);
  color: #e3f2f7; font-weight: 600; font-size: 13.5px; cursor: pointer; text-align: left; }
.install-btn:hover { background: rgba(62,212,239,.22); }
@media (max-width: 860px) { .install-btn { display: none; } }
.install-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.install-card > div { flex: 1; min-width: 200px; }
.install-card h3 { margin: 0 0 4px; }
.install-card p { margin: 0; }
.install-card img, .install-help img { filter: drop-shadow(0 6px 14px rgba(18,81,130,.25)); }
.install-help { display: grid; justify-items: center; gap: 14px; }
.install-help ol { line-height: 1.7; margin: 0; padding-left: 20px; justify-self: stretch; }

/* Enviar la cotización y estado del link */
.q-banner { padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 13.5px; line-height: 1.45; }
.q-banner.ok { background: var(--green-soft); color: #174758; }
.q-banner.warn { background: var(--amber-soft); color: #7a5208; }
.q-send { display: grid; gap: 12px; }
.q-send h3 { margin: 8px 0 0; font-size: 14px; }
.q-send p { margin: 0; }
.q-link { display: flex; gap: 8px; }
.q-link input { flex: 1; min-width: 0; font-size: 13px; }
.q-send-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.q-send .btn { text-decoration: none; }
.q-share { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: #f4f8fd; border: 1px solid #d9e8f3; font-size: 13px; }
.q-share-row { display: flex; gap: 8px; align-items: baseline; }
.q-share-row.muted { color: var(--muted); }
.q-share-row.ok { color: #174758; font-weight: 600; }
.q-share-row.bad { color: var(--red); font-weight: 600; }
.q-share-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.q-share-btns .btn { text-decoration: none; }
.q-auto { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--green-soft); cursor: pointer; }
.q-auto input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--green); }
.q-auto-list { margin: 4px 0 8px; padding: 8px 12px 8px 30px; border-left: 3px solid var(--green-2); background: #f6fafb; border-radius: 0 8px 8px 0; font-size: 13px; }

/* Facturas */
.inv-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.inv-bar select { max-width: 280px; }
.kpi strong.red { color: var(--red); }
.inv-lines { display: grid; gap: 8px; }
.inv-line { display: grid; grid-template-columns: 1fr 80px 110px 100px 34px; gap: 8px; align-items: center; }
.inv-line-h { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.inv-line-amt { text-align: right; font-variant-numeric: tabular-nums; }
.inv-paylist ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.inv-paylist li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; font-size: 13px; padding: 8px 10px; background: var(--green-soft); border-radius: 8px; }
.inv-payform { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.inv-payform-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inv-payform-grid label { font-size: 12.5px; }
.inv-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); cursor: pointer; }
.pay-form { display: grid; gap: 10px; }
.pay-opt { display: grid; grid-template-columns: 210px 1fr; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pay-opt .s { grid-column: 2; }
.pay-opt-on { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.pay-opt-on input { width: 18px; height: 18px; accent-color: var(--green); }
@media (max-width: 700px) {
  .inv-line { grid-template-columns: 1fr 64px 90px 30px; }
  .inv-line > :nth-child(4) { display: none; }
  .inv-line-h > :nth-child(4) { display: none; }
  .pay-opt { grid-template-columns: 1fr; } .pay-opt .s { grid-column: 1; }
  .inv-payform-grid { grid-template-columns: 1fr; }
}

/* Órdenes de trabajo */
.wo-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 6px; background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.wo-team { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.wo-pick { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.wo-pick input { accent-color: var(--green); }
.wo-ready .row { gap: 10px; }
.wo-sent > summary { cursor: pointer; padding: 2px 0; }
.wo-sent .list { margin-top: 10px; }
.wo-sent .row { gap: 10px; }

/* Personal asignado en la orden de trabajo */
.wo-crew { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafc; }
.wo-crew-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 12px; }
.wo-crew-h .btn { margin-left: auto; }
.wo-crew-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.wo-crew-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 64px; text-align: left; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; font: inherit; color: inherit; }
.wo-crew-card:hover { border-color: var(--green-2); }
.wo-crew-card.on { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 2px rgba(10,111,176,.15); }
.wo-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; flex: none; }
.wo-crew-card.on .wo-av { background: var(--green); }
.wo-crew-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.wo-crew-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wo-crew-txt small { color: var(--muted); font-size: 12px; }
.wo-busy { color: var(--amber) !important; font-weight: 600; }
.wo-tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); font-weight: 700; flex: none; color: var(--muted); }
.wo-crew-card.on .wo-tick { background: var(--green); border-color: var(--green); color: #fff; }
.wo-crew-add { display: grid; grid-template-columns: 1fr 1fr 130px auto; gap: 8px; margin-top: 12px; }
@media (max-width: 700px) { .wo-crew-add { grid-template-columns: 1fr; } .wo-crew-h .btn { margin-left: 0; } }

/* Equipo (como Team de North Crescent) */
.tm-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tm-top p { margin: 0; max-width: 70ch; }
.tm-list { display: grid; gap: 8px; }
.tm-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  box-shadow: var(--shadow); cursor: pointer; font: inherit; color: inherit; }
.tm-row:hover { border-color: var(--green-2); }
.tm-row.off { opacity: .65; }
.tm-av, .wo-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; flex: none; object-fit: cover; }
.wo-av { width: 40px; height: 40px; font-size: 14px; }
.tm-main { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.tm-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tm-week { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.tm-week b { font-size: 20px; color: var(--navy); line-height: 1; }
.tm-week small { color: var(--muted); font-size: 11.5px; }
.tm-form .opt { font-weight: 400; color: var(--muted); font-size: 12px; }
.tm-active { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--green-soft); }
.tm-active input { width: 18px; height: 18px; accent-color: var(--green); }
.tm-profile { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px 16px; display: grid; gap: 10px; }
.tm-profile legend { font-weight: 700; padding: 0 6px; }
.tm-photo-row { display: flex; gap: 14px; align-items: center; }
.tm-photo { width: 96px; height: 120px; border-radius: 12px; object-fit: cover; background: #eef2f6; display: grid; place-items: center; font-size: 30px; flex: none; color: var(--navy); font-weight: 700; }
.tm-photo.big { width: 120px; height: 150px; }
.tm-photo-btns { display: flex; gap: 8px; margin-bottom: 4px; }
.tm-g { font-weight: 600; font-size: 13px; }
.tm-certs { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-card { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 6px 0 4px; }
.tm-card span { color: var(--muted); font-size: 13px; }
.tm-card em { font-size: 13px; color: var(--ink-2); }
@media (max-width: 600px) { .tm-week small { display: none; } }

/* Mis trabajos (personal) */
.mj-hi { margin: 0 0 14px; }
.mj-list { display: grid; gap: 12px; }
.mj-card { padding: 16px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); border-left: 5px solid var(--navy); display: grid; gap: 8px; }
.mj-card.st-in-progress { border-left-color: var(--green-2); }
.mj-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.mj-card header b { display: block; font-size: 17px; }
.mj-card header span { color: var(--muted); font-size: 13px; }
.mj-when { font-weight: 600; }
.mj-addr { color: var(--green); font-weight: 600; text-decoration: none; }
.mj-box { padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.mj-box p { margin: 4px 0 0; white-space: pre-line; }
.mj-box.access { background: var(--green-soft); } .mj-box.special { background: var(--amber-soft); }
.mj-tasks summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.mj-tasks ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.mj-tasks li { padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.mj-tasks li.svc { font-weight: 700; color: var(--navy); border-bottom: 2px solid var(--green-2); }
.mj-tasks input { width: 18px; height: 18px; accent-color: var(--green); vertical-align: -3px; }
.mj-acts { display: flex; gap: 8px; }
.mj-acts .btn { flex: 1; min-height: 48px; font-size: 16px; }
.mj-done { margin-top: 14px; }

/* Acceso a la app (Equipo) */
.tm-top-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tm-access { border: 1.5px solid var(--navy-2); border-radius: 14px; padding: 14px 16px; background: #f5fafe; display: grid; gap: 8px; }
.tm-access h3 { margin: 0; }
.tm-access p { margin: 0; }
.tm-acc-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-perms { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 14px; display: grid; gap: 10px; background: var(--card); }
.tm-perms legend { font-weight: 700; padding: 0 6px; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.acc-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.acc-item input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); flex: none; }
.acc-item span { display: flex; flex-direction: column; } .acc-item small { color: var(--muted); font-size: 12px; }
.acc-item:has(input:checked) { border-color: var(--green); background: var(--green-soft); }

/* App del personal: perfil, pestañas, calendario y visita en sitio */
.mj-me { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.mj-av { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; font-size: 20px; flex: none; }
.mj-me-txt { display: grid; flex: 1; min-width: 140px; } .mj-me-txt b { font-size: 18px; } .mj-me-txt span { color: var(--muted); font-size: 13px; }
.mj-stats { display: flex; gap: 8px; }
.mj-stats span { display: grid; text-align: center; padding: 8px 12px; border-radius: 12px; background: var(--bg); min-width: 64px; }
.mj-stats b { font-size: 18px; color: var(--navy); } .mj-stats small { color: var(--muted); font-size: 11.5px; }
.mj-live { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 16px; margin-bottom: 12px; border: 0; border-radius: 14px; background: var(--green-soft); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.mj-live .go { margin-left: auto; font-weight: 700; color: var(--navy); white-space: nowrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 0 4px rgba(10,111,176,.22); animation: vs-pulse 1.6s infinite; }
@keyframes vs-pulse { 50% { box-shadow: 0 0 0 8px rgba(10,111,176,0); } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
.mj-tabs { margin-bottom: 12px; } .mj-tabs button { padding: 8px 18px; font-size: 14px; }
.mj-h { margin: 14px 0 8px; font-size: 15px; } .mj-h.warn { color: var(--red); }
button.mj-card { width: 100%; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.mj-card.st-done { border-left-color: var(--teal); } .mj-card.st-no-access { border-left-color: var(--red); }
.mj-addr { overflow-wrap: anywhere; }
.mj-vline { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.mj-open { justify-self: end; font-weight: 700; color: var(--navy); font-size: 14px; }
.mj-cal { padding: 12px; }
.mj-cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; } 
.mj-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mj-cal-g .wd { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 2px 0; }
.mj-cal-g .day { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font: inherit; display: grid; place-items: center; align-content: center; gap: 2px; cursor: pointer; padding: 0; }
.mj-cal-g .day.has { background: #f2f6f7; font-weight: 700; }
.mj-cal-g .day.today { border-color: var(--green); border-width: 2px; }
.mj-cal-g .day.sel { background: var(--navy); color: #fff; }
.mj-cal-g .dots { display: flex; gap: 2px; } .mj-cal-g .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--navy); }
.mj-cal-g .dots i.st-done { background: var(--teal); } .mj-cal-g .dots i.st-in-progress { background: var(--green-2); } .mj-cal-g .dots i.st-no-access { background: var(--red); }
.vs { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.vs h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.vs-sum { display: grid; gap: 10px; }
.vs-links, .vs-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vs-links .btn { overflow-wrap: anywhere; text-align: left; }
.vs-start { display: grid; gap: 12px; } .vs-start p { margin: 0; }
.btn.big { min-height: 58px; font-size: 18px; width: 100%; }
.vs-steps { display: grid; gap: 14px; }
.vs-on { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--green-soft); }
.vs-on > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vs-photos { display: grid; gap: 10px; }
.vs-photos .rp-photos { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.vs-photos .rp-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.vs-check { list-style: none; margin: 0; padding: 0; display: grid; }
.vs-check label { display: flex; gap: 12px; align-items: flex-start; padding: 11px 2px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 15px; }
.vs-check input { width: 22px; height: 22px; accent-color: var(--green); flex: none; margin: 0; }
.vs-check input:checked + span { color: var(--muted); text-decoration: line-through; }
.vs-check li { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.vs-check li label { flex: 1; border-bottom: 0; }
.vs-na { flex: none; min-height: 34px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; }
.vs-na.on { background: var(--muted); border-color: var(--muted); color: #fff; }
.vs-check li.na span { color: var(--muted); font-style: italic; }
.vs-done { display: grid; gap: 8px; } .vs-done p { margin: 0; }
.vs-panel { display: grid; gap: 10px; }
.vs-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 8px; background: var(--card); }
.vs-item-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; } .vs-item-h b { margin-left: auto; }
.vs-item-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
/* Horas y nómina */
.hr-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 12px; }
.hr-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .hr-nav b { min-width: 170px; text-align: center; }
.hr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.hr-tiles .panel { display: grid; gap: 2px; padding: 14px; } .hr-tiles small { color: var(--muted); } .hr-tiles b { font-size: 22px; color: var(--navy); }
.hr-tiles .panel.warn { box-shadow: inset 4px 0 0 var(--red), var(--shadow); } .hr-tiles .panel.warn b { color: var(--red); }
.hr-list { display: grid; gap: 10px; }
.hr-p summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; } .hr-p summary::-webkit-details-marker { display: none; }
.hr-name { display: grid; flex: 1; } .hr-name small { color: var(--muted); }
.hr-sum { display: grid; text-align: right; } .hr-sum b { font-size: 18px; } .hr-sum small { color: var(--green); font-weight: 700; }
.hr-p[open] summary { margin-bottom: 10px; }
.hr-table { width: 100%; border-collapse: collapse; font-size: 13.5px; display: block; overflow-x: auto; }
.hr-table th, .hr-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.hr-table th { color: var(--muted); font-size: 12px; } .hr-table .num { text-align: right; font-weight: 700; } .hr-table tr.open td { background: var(--green-soft); }
.mj-acts a.btn { text-decoration: none; display: flex; align-items: center; justify-content: center; }
.mj-acts a.btn:not(.primary) { color: var(--ink); }
.mj-sum > .btn { justify-self: stretch; min-height: 44px; }
/* Día del calendario: servicios desplegables con su resumen */
.mj-daylist { scroll-margin-top: 12px; }
.mj-daylist .mj-h { display: flex; align-items: center; gap: 8px; }
.mj-sum > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.mj-sum > summary::-webkit-details-marker { display: none; }
.mj-sum-time { font-weight: 800; color: var(--navy); min-width: 64px; }
.mj-sum-who { display: grid; flex: 1; min-width: 0; } .mj-sum-who b { font-size: 16px; } .mj-sum-who small { color: var(--muted); }
.mj-sum-chev { font-size: 20px; color: var(--muted); transition: transform .2s; }
.mj-sum[open] .mj-sum-chev { transform: rotate(180deg); }
.mj-sum[open] > summary { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.mj-sum-t { margin: 4px 0 0; font-size: 14px; color: var(--navy); }
.mj-cal-g .day.has::after { content: ""; }
@media (prefers-reduced-motion: reduce) { .mj-sum-chev { transition: none; } }
.mj-sum-who .pill { justify-self: start; margin-top: 4px; }
.mj-sum-time { align-self: flex-start; padding-top: 2px; }
.mj-sum > .btn { width: 100%; min-height: 46px; }
.mj-sum .mj-acts { flex-wrap: wrap; }
.mj-sum-chev { display: inline-block; }

/* ===================== Efectos premium (todo el CRM, lenguaje de Documentos) ===================== */
/* Brillo que sigue al mouse/dedo dentro de cada tarjeta (fx.js pone --mx/--my) */
:is(.panel, .kpi, .mj-card, .tm-row, .hr-p, .vs-item, .wo-crew-card, .ftile, .q-share, .mj-live, .tm-card, .install-card) {
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, border-color .2s ease, background-color .2s ease; }
@media (hover: hover) {
  :is(.panel, .kpi, .mj-card, .tm-row, .hr-p, .vs-item, .q-share, .tm-card, .install-card):hover {
    background-image: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(62,212,239,.2), transparent 62%); }
  /* Las que se pueden tocar se levantan como las carpetas de Documentos */
  :is(.kpi, .mj-card, .tm-row, .hr-p, .vs-item, .wo-crew-card, .mj-live, .tm-card, .install-card, .hr-tiles .panel):hover {
    transform: translateY(-3px); box-shadow: 0 12px 28px rgba(10,33,57,.12), 0 0 0 1px rgba(62,212,239,.35); }
  .mj-cal-g .day:hover { transform: translateY(-2px); border-color: var(--green-2); box-shadow: 0 6px 14px rgba(10,33,57,.1); }
  .tbl tbody tr { transition: background-color .15s, box-shadow .15s; }
  .tbl tbody tr:hover { background: linear-gradient(90deg, #eef6f9, #f9fbfc 60%); box-shadow: inset 3px 0 0 var(--green-2); }
  .row { transition: background-color .15s, box-shadow .15s; }
  .row:hover { background: linear-gradient(90deg, #eef6f9, #f9fbfc 60%); box-shadow: inset 3px 0 0 var(--green-2); }
  .btn { transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease; }
  .btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10,33,57,.1); }
  .btn.primary:hover { box-shadow: 0 6px 18px rgba(10,111,176,.32); }
}
/* Al presionar: se hunde un poco (celular y computadora) */
:is(.kpi, .mj-card, .tm-row, .wo-crew-card, .mj-live, .mj-cal-g .day, .btn, .tm-card):active { transform: translateY(0) scale(.985); }
:is(.mj-card, .tm-row, .wo-crew-card, .mj-cal-g .day, .mj-live):focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(62,212,239,.45); }
.mj-cal-g .day { transition: transform .18s ease, box-shadow .2s, border-color .2s, background-color .2s; }
.mj-cal-g .day.has { border-color: #bfdee9; }
.mj-cal-g .day.sel { box-shadow: 0 8px 18px rgba(16,76,122,.3); transform: translateY(-2px); }
/* Seleccionado / abierto: aro verde y palomita como el archivo elegido en Documentos */
.mj-sum[open] { box-shadow: 0 0 0 2px var(--green-2), 0 14px 30px rgba(10,33,57,.12); }
.mj-sum > summary .fbadge, .mj-card header .fbadge { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.mj-sum[open] > summary .fbadge, .mj-card:hover header .fbadge { transform: scale(1.08) rotate(-4deg); }
.mj-card header .mj-hd { flex: 1; min-width: 0; }
.mj-card header { align-items: center; }
/* Onda al tocar */
.fx-host { position: relative; overflow: hidden; isolation: isolate; }
.fx-ripple { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(62,212,239,.38) 0%, rgba(62,212,239,0) 70%);
  transform: scale(0); animation: fx-ripple .6s ease-out forwards; z-index: -1; }
.btn.primary .fx-ripple, .mj-cal-g .day.sel .fx-ripple, #nav a .fx-ripple { background: radial-gradient(circle, rgba(255,255,255,.45) 0%, rgba(255,255,255,0) 70%); }
@keyframes fx-ripple { to { transform: scale(1); opacity: 0; } }
/* Entrada de cada pantalla: tarjetas en cascada */
.fx-enter > *, .fx-enter :is(.kpis, .mj-list, .hr-list, .hr-tiles, .tm-list, .mj-cal-g) > * { animation: fx-in .45s cubic-bezier(.2,.8,.2,1) both; }
.fx-enter > *:nth-child(2), .fx-enter :is(.kpis, .mj-list, .hr-list, .hr-tiles, .tm-list) > *:nth-child(2) { animation-delay: .05s; }
.fx-enter > *:nth-child(3), .fx-enter :is(.kpis, .mj-list, .hr-list, .hr-tiles, .tm-list) > *:nth-child(3) { animation-delay: .1s; }
.fx-enter > *:nth-child(4), .fx-enter :is(.kpis, .mj-list, .hr-list, .hr-tiles, .tm-list) > *:nth-child(4) { animation-delay: .15s; }
.fx-enter > *:nth-child(n+5), .fx-enter :is(.kpis, .mj-list, .hr-list, .hr-tiles, .tm-list) > *:nth-child(n+5) { animation-delay: .2s; }
.fx-enter .mj-cal-g > * { animation-name: fx-pop; animation-duration: .35s; }
@keyframes fx-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fx-pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
/* Los servicios del día se despliegan suave */
.mj-sum[open] > :not(summary) { animation: fx-in .3s ease both; }
@media (prefers-reduced-motion: reduce) {
  .fx-enter > *, .fx-enter * , .mj-sum[open] > :not(summary) { animation: none !important; }
  :is(.kpi, .mj-card, .tm-row, .hr-p, .vs-item, .wo-crew-card, .mj-live, .mj-cal-g .day, .btn, .tm-card):is(:hover, :active) { transform: none !important; }
}
.mj-sum-who .mj-sum-time { min-width: 0; padding: 0; font-size: 13px; letter-spacing: .02em; color: var(--green); }
.mj-sum > summary .fbadge { width: 44px; height: 44px; border-radius: 12px; }
.mj-sum > summary .fbadge svg { width: 24px; height: 24px; }
.mj-card header .fbadge svg, .mj-sum .fbadge svg { width: 20px; height: 20px; }
/* Fotos por sección (como North Crescent): cada área con sus fotos y su estado de subida */
.pa-help { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.pa-list { display: grid; gap: 10px; }
.pa { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--card); transition: border-color .2s, background-color .2s; }
.pa.has { border-color: #bfdee9; }
.pa.need { border-style: dashed; border-color: var(--amber); background: #fffaf0; }
.pa-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pa-head b { font-size: 15px; }
.pa-req { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--amber); }
.pa-n { font-size: 13px; font-weight: 700; color: var(--green); }
.pa-st { margin-left: auto; font-size: 12.5px; font-weight: 700; border: 0; border-radius: 999px; padding: 4px 10px; }
.pa-st.up { background: var(--green-soft); color: var(--green); }
.pa-st.err { background: var(--red-soft); color: var(--red); cursor: pointer; font: inherit; font-weight: 700; }
.pa-err { display: block; color: var(--red); margin-top: 4px; }
.pa-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 2px; scroll-snap-type: x proximity; }
.pa-t { position: relative; flex: none; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: #eef2f6; scroll-snap-align: start; }
.pa-t img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pa-t.wait img, .pa-t.up img { opacity: .55; }
.pa-t.up::after { content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.9); border-top-color: var(--green); animation: wx-spin .8s linear infinite; }
.pa-t.err { outline: 2px solid var(--red); outline-offset: -2px; }
.pa-t i { position: absolute; top: 4px; right: 4px; font-style: normal; font-weight: 800; color: #fff; background: var(--red); border-radius: 50%; width: 18px; height: 18px; display: grid; place-items: center; font-size: 12px; }
.pa-t i:empty { display: none; }
.pa-t.ok::after { content: "✓"; position: absolute; right: 4px; bottom: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.pa-add { flex: none; width: 76px; height: 76px; border-radius: 10px; border: 1.5px dashed var(--green-2); background: #f3f8fa; color: var(--green); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; display: grid; place-content: center; gap: 0; }
.pa-add span { font-size: 24px; line-height: 1; }
/* Calendarios con contenido dentro de cada día */
.cal-day { min-height: 74px; justify-content: flex-start; gap: 3px; }
.cal-evs { display: grid; gap: 2px; min-width: 0; }
.cal-ev { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; line-height: 1.35; color: var(--ink-2);
  padding: 1px 5px; border-radius: 5px; background: #fff; border-left: 3px solid var(--navy); }
.cal-ev b { color: var(--navy); font-weight: 800; }
.cal-ev.s-Done { border-left-color: var(--green); } .cal-ev.s-Done b { color: var(--green); }
.cal-ev.s-In-progress { border-left-color: var(--green-2); }
.cal-ev.s-No-access { border-left-color: var(--red); }
.cal-more { font-size: 10px; font-weight: 700; color: var(--green); padding-left: 2px; }
.cal-day .cal-jobs { margin-top: auto; }
.cal-dots i.s-In-progress { background: var(--green-2); }
@media (min-width: 641px) { .cal-day .cal-jobs { display: none; } }
@media (max-width: 640px) { .cal-day { min-height: 46px; } .cal-evs, .cal-more { display: none; } }
/* Mis trabajos: hora del primer servicio e íconos de los servicios del día */
.mj-cal-g .day { place-items: stretch; align-content: start; justify-items: start; padding: 5px 5px 4px; gap: 1px; aspect-ratio: auto; min-height: 58px; }
.mj-cal-g .day .mj-dn { font-size: 14px; font-weight: 700; line-height: 1; }
.mj-day-t { font-size: 10.5px; font-weight: 800; color: var(--green); line-height: 1.2; }
.mj-day-ic { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.mj-day-ic .fbadge.xs { width: 17px; height: 17px; border-radius: 5px; }
.mj-day-ic .fbadge.xs svg { width: 11px; height: 11px; }
.mj-day-ic .fbadge.st-done { background: var(--teal); color: #fff; }
.mj-day-ic .fbadge.st-no-access { background: var(--red-soft); color: var(--red); }
.mj-day-ic small { font-size: 10px; font-weight: 800; color: var(--muted); }
.mj-cal-g .day.sel .mj-day-t { color: var(--green-2); }
.mj-cal-g .day.sel .fbadge { background: rgba(255,255,255,.18); color: #fff; }
/* Si la celda es angosta se ve solo la hora; el nombre aparece cuando hay espacio */
.cal-grid { container-type: inline-size; }
@container (max-width: 560px) { .cal-ev-n { display: none; } .cal-ev { text-align: center; padding: 1px 3px; } }
/* Enlaces con forma de botón: nunca subrayados ni azules (Google Maps, Llamar, WhatsApp…) */
a.btn { text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
a.btn.primary { color: #fff; }
a.btn:visited { color: var(--ink); } a.btn.primary:visited { color: #fff; }
/* GPS del personal */
.gps-off { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: 14px; background: var(--red-soft); box-shadow: inset 4px 0 0 var(--red); }
.gps-off > div { display: grid; flex: 1; min-width: 0; } .gps-off b { color: var(--red); } .gps-off small { color: var(--ink-2); }
.gps-ic { font-size: 22px; }
.gps-on { font-size: 12.5px; font-weight: 700; color: var(--green); }
/* Tiempos por trabajo */
.hr-tabs { margin: 0 0 12px; } .hr-tabs button { padding: 7px 16px; font-size: 13.5px; }
.jt { padding: 6px 10px; overflow-x: auto; }
.jt-table { display: table; width: 100%; min-width: 0; font-size: 13px; }
.jt-table th, .jt-table td { padding: 7px 6px; }
.jt-table td:nth-child(3) { white-space: normal; min-width: 120px; }
.jt-gps .pill { font-size: 11px; padding: 2px 7px; }
.jt-table td { vertical-align: top; }
.jt-table td small { display: block; }
.jt-table td.num.bad { color: var(--red); } .jt-table td.num.good { color: var(--green); }
.jt-gps { display: grid; gap: 4px; justify-items: start; }
/* Filtro de fechas y cleaner (Horas y nómina) */
.hr-filter { display: grid; gap: 10px; padding: 14px 16px; }
.hr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hr-chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.hr-chip:hover { border-color: var(--green-2); background: #f3f8fa; }
.hr-chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.hr-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.hr-row label { display: grid; gap: 3px; font-size: 12px; font-weight: 700; color: var(--muted); }
.hr-row label span { text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.hr-date, .hr-who select { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); min-width: 150px; }
.hr-who select { min-width: 180px; }
.hr-csv { margin-left: auto; }
.hr-range { margin: 0; }
@media (max-width: 640px) { .hr-date { min-width: 0; width: 100%; } .hr-row label { flex: 1 1 40%; } .hr-who { flex-basis: 100% !important; } .hr-csv { margin-left: 0; width: 100%; } }
.hr-row > .btn.small { align-self: flex-end; height: 38px; }
/* Corregir horas */
.hr-edit { padding: 3px 8px; }
.hr-edited { font-size: 11px; }
.hr-ed-who { display: grid; gap: 2px; padding: 10px 12px; background: var(--bg); border-radius: 10px; }
.hr-ed-who span { color: var(--ink-2); } .hr-ed-who small { color: var(--muted); }
.hr-ed-total { margin: 0; } .hr-ed-total b { color: var(--green); } .hr-ed-total b.bad { color: var(--red); }
.hr-ed-lock { border: 1.5px solid var(--navy-2); border-radius: 12px; padding: 10px 14px 14px; background: #f5fafe; display: grid; gap: 10px; }
.hr-ed-lock legend { font-weight: 800; color: var(--navy); padding: 0 6px; }
.hr-ed-log h3 { margin: 6px 0; font-size: 14px; }
.hr-ed-log ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.hr-ed-log li { display: grid; gap: 2px; font-size: 13px; padding: 8px 10px; border-left: 3px solid var(--green-2); background: var(--bg); border-radius: 0 8px 8px 0; }
.hr-ed-log em { color: var(--muted); }
.rp-edits { background: #eef4fb; border-left-color: var(--navy); } .rp-edits h3 { color: var(--navy); }
/* Órdenes de trabajo: calendario del mes (antes Agenda) */
.wo-mode { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.wo-mode .seg button { padding: 7px 16px; font-size: 13.5px; }
.wc { padding: 16px; }
.wc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.wc-head h3 { margin: 0 4px; font-size: 18px; min-width: 170px; text-align: center; }
.wc-sum { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.wc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wc-heads span { text-align: center; font-size: 11.5px; font-weight: 700; text-transform: uppercase; color: var(--muted); padding-bottom: 2px; }
.wc-day { min-height: 112px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0;
  transition: border-color .15s, box-shadow .2s, transform .15s; }
.wc-day:hover { border-color: var(--green-2); box-shadow: 0 6px 16px rgba(10,33,57,.08); }
.wc-day.out { background: #f7f9fa; } .wc-day.out .wc-n { color: #b8c4cc; }
.wc-day.has { background: #fbfdfe; }
.wc-day.today { border: 2px solid var(--green-2); }
.wc-day.sel { box-shadow: 0 0 0 3px rgba(62,212,239,.45); border-color: var(--green); }
.wc-top { display: flex; align-items: center; justify-content: space-between; }
.wc-n { font-weight: 800; font-size: 13.5px; }
.wc-day.today .wc-n { color: var(--green); }
.wc-add { border: 0; background: none; color: var(--green); font-size: 18px; line-height: 1; width: 22px; height: 22px; border-radius: 6px; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; }
.wc-day:hover .wc-add, .wc-add:focus-visible { opacity: 1; } .wc-add:hover { background: var(--green-soft); }
.wc-ev { display: block; width: 100%; min-width: 0; text-align: left; border: 0; border-left: 3px solid var(--navy); background: #f1f7fb; color: var(--ink-2); border-radius: 5px;
  padding: 2px 5px; font: inherit; font-size: 11.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.wc-ev:hover { background: #e4eff8; }
.wc-ev b { color: var(--navy); font-weight: 800; }
.wc-ev.s-Done { border-left-color: var(--green); background: var(--green-soft); } .wc-ev.s-Done b { color: var(--green); }
.wc-ev.s-In-progress { border-left-color: var(--green-2); background: #eff7fa; }
.wc-ev.s-No-access { border-left-color: var(--red); background: var(--red-soft); } .wc-ev.s-No-access b { color: var(--red); }
.wc-ev.s-Cancelled { opacity: .5; text-decoration: line-through; border-left-color: #b8c4cc; background: #f4f6f8; }
.wc-more { font-size: 11px; font-weight: 700; color: var(--green); padding-left: 3px; }
.wc-dots { display: none; gap: 2px; margin-top: auto; } .wc-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--navy); }
.wc-dots i.s-Done { background: var(--green); } .wc-dots i.s-In-progress { background: var(--green-2); } .wc-dots i.s-No-access { background: var(--red); } .wc-dots i.s-Cancelled { background: #c5d0d8; }
.cal-legend i.s-No-access { background: var(--red); } .cal-legend i.s-In-progress { background: var(--green-2); } .cal-legend i.s-Scheduled { background: var(--navy); }
.wc-list { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; scroll-margin-top: 12px; }
.wc-list h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 15px; }
.wc-row { cursor: pointer; }
@media (max-width: 760px) {
  .wc { padding: 10px; } .wc-grid { gap: 3px; } .wc-head h3 { min-width: 0; font-size: 16px; } .wc-sum { margin-left: 0; width: 100%; }
  .wc-day { min-height: 52px; padding: 4px; border-radius: 8px; } .wc-ev, .wc-more, .wc-add { display: none; } .wc-dots { display: flex; }
  .wc-heads span { font-size: 10px; }
}
.wo-cal { margin-bottom: 16px; }
.wo-cal > summary { cursor: pointer; list-style: none; padding: 6px 2px 10px; }
.wo-cal > summary::-webkit-details-marker { display: none; }
.wo-cal > summary::before { content: "▸ "; color: var(--green); } .wo-cal[open] > summary::before { content: "▾ "; }
.wo-cal { margin: 18px 0 0; }
.wc-ev[draggable="true"] { cursor: grab; } .wc-ev.dragging { opacity: .4; }
.wc-day.drop { border: 2px dashed var(--green); background: var(--green-soft); }
.wc-row { grid-template-columns: 1fr auto; align-items: center; }
.wc-row > div:first-child { cursor: pointer; }
.wc-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.wc-actions { display: grid; gap: 14px; }
.wc-big { display: grid; gap: 8px; } .wc-big .btn { min-height: 46px; font-size: 15px; }
@media (max-width: 640px) { .wc-row { grid-template-columns: 1fr; } .wc-acts { justify-content: flex-start; } }

/* ===================== Calendario del mes (el alma del sistema) ===================== */
.wo-cal > summary { font-size: 15px; }
.wc { padding: 0; overflow: hidden; border-radius: 20px; background: var(--card); box-shadow: 0 18px 40px -26px rgba(10,33,57,.55), var(--shadow); }
.wc-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 22px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(62,212,239,.28), transparent 55%), linear-gradient(135deg, #082f55 0%, var(--navy) 55%, #17508f 100%); }
.wc-hero::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(62,212,239,.25), transparent 70%); pointer-events: none; }
.wc-title { display: flex; align-items: center; gap: 10px; }
.wc-title h3 { margin: 0; font-size: 26px; letter-spacing: -.02em; line-height: 1; }
.wc-title div > span { font-size: 13px; color: #9ee6f6; font-weight: 600; letter-spacing: .08em; }
.wc-nav { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
  transition: background .15s, transform .15s; }
.wc-nav:hover { background: rgba(255,255,255,.2); transform: scale(1.06); }
.wc-todaybtn { margin-left: 4px; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--green-2); color: var(--ink); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.wc-todaybtn:hover { filter: brightness(1.05); }
.wc-stats { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.wc-stat { min-width: 84px; padding: 8px 12px; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(4px); display: grid; }
.wc-stat b { font-size: 22px; line-height: 1.1; } .wc-stat span { font-size: 11.5px; color: #c9ddec; }
.wc-stat.ok b { color: #9ee6f6; } .wc-stat.warn { background: rgba(200,67,58,.28); border-color: rgba(255,160,150,.4); }
.wc-body { padding: 14px 14px 4px; }
.wc-body.slide-next { animation: wc-next .35s cubic-bezier(.2,.8,.2,1); } .wc-body.slide-prev { animation: wc-prev .35s cubic-bezier(.2,.8,.2,1); }
@keyframes wc-next { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes wc-prev { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.wc-grid { gap: 6px; }
.wc-heads { margin-bottom: 6px; } .wc-heads span { font-size: 11px; letter-spacing: .08em; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.wc-heads span.wknd { color: var(--green); }
.wc-day { position: relative; min-height: 122px; border: 1px solid #e6edf1; border-radius: 14px; background: #fff; padding: 7px 7px 10px; gap: 4px; overflow: hidden; }
.wc-day.wknd { background: #fafbfc; }
.wc-day.out { background: transparent; border-style: dashed; border-color: #eef2f4; } .wc-day.out > * { opacity: .45; }
.wc-day.past:not(.today) .wc-n { color: #8a9aa6; }
.wc-day:hover { border-color: var(--green-2); box-shadow: 0 10px 24px -12px rgba(10,33,57,.25); transform: translateY(-2px); }
.wc-day.today { border: 2px solid var(--green-2); background: linear-gradient(180deg, #f0f8fb, #fff 45%); }
.wc-day.sel { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(18,81,130,.15), 0 12px 26px -14px rgba(10,33,57,.35); }
.wc-top { gap: 6px; justify-content: flex-start; }
.wc-n { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 13.5px; }
.wc-day.today .wc-n { background: var(--green); color: #fff; }
.wc-today { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--green); }
.wc-add { margin-left: auto; }
.wc-evs { display: grid; gap: 4px; min-width: 0; }
.wc-ev { display: flex; align-items: center; gap: 5px; border: 0; border-left: 0; border-radius: 8px; padding: 3px 6px 3px 3px; background: #eef5fa; color: var(--ink-2);
  box-shadow: inset 3px 0 0 var(--navy); transition: transform .15s, box-shadow .15s, background .15s; }
.wc-ev:hover { background: #e2eef7; transform: translateX(2px); }
.wc-ev .fbadge.xs { width: 18px; height: 18px; border-radius: 6px; flex: none; margin-left: 3px; }
.wc-ev .fbadge.xs svg { width: 11px; height: 11px; }
.wc-ev-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.wc-ev-t b { margin-right: 4px; }
.wc-ev.s-Done { background: #e6f2f6; box-shadow: inset 3px 0 0 var(--green); }
.wc-ev.s-In-progress { background: #e9f5fa; box-shadow: inset 3px 0 0 var(--green-2); }
.wc-ev.s-No-access { background: var(--red-soft); box-shadow: inset 3px 0 0 var(--red); }
.wc-ev.s-Cancelled { background: #f3f5f7; box-shadow: inset 3px 0 0 #c5d0d8; }
.wc-warn { flex: none; width: 15px; height: 15px; border-radius: 50%; background: var(--red); color: #fff; font-style: normal; font-weight: 800; font-size: 10px; display: grid; place-items: center; margin-left: auto; }
.wc-load { position: absolute; left: 8px; right: 8px; bottom: 5px; height: 3px; border-radius: 3px; background: #eef2f4; }
.wc-load i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-2), var(--green)); }
.wc.dragmode .wc-day:not(.out) { border-style: dashed; border-color: #bfdee9; }
.wc-day.drop { border: 2px solid var(--green) !important; background: var(--green-soft) !important; transform: scale(1.02); }
.wc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 18px 14px; font-size: 12px; color: var(--muted); }
.wc-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.wc-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--navy); }
.wc-legend i.s-Done { background: var(--green); } .wc-legend i.s-In-progress { background: var(--green-2); } .wc-legend i.s-No-access { background: var(--red); } .wc-legend i.s-Cancelled { background: #c5d0d8; }
.wc-tip { margin-left: auto; color: var(--green); font-weight: 600; }
.wc-list { margin: 0; padding: 16px 18px 18px; border-top: 1px solid var(--line); background: linear-gradient(180deg, #f7fafb, #fff 60px); }
.wc-list-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.wc-list-h > div { display: grid; } .wc-list-h b { font-size: 17px; } .wc-list-h span { font-size: 13px; color: var(--muted); }
.wc-cards { display: grid; gap: 10px; }
.wc-card { display: grid; grid-template-columns: 64px auto 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line);
  box-shadow: inset 4px 0 0 var(--navy); transition: transform .15s, box-shadow .2s; }
.wc-card:hover { transform: translateY(-2px); box-shadow: inset 4px 0 0 var(--navy), 0 12px 24px -16px rgba(10,33,57,.35); }
.wc-card.s-Done { box-shadow: inset 4px 0 0 var(--green); } .wc-card.s-In-progress { box-shadow: inset 4px 0 0 var(--green-2); }
.wc-card.s-No-access { box-shadow: inset 4px 0 0 var(--red); } .wc-card.s-Cancelled { box-shadow: inset 4px 0 0 #c5d0d8; opacity: .7; }
.wc-card-time { display: grid; text-align: center; } .wc-card-time b { font-size: 18px; color: var(--navy); } .wc-card-time span { font-size: 11.5px; color: var(--muted); }
.wc-card-main { display: grid; gap: 2px; min-width: 0; cursor: pointer; } .wc-card-main > b { font-size: 15px; } .wc-card-main > span { font-size: 12.5px; color: var(--muted); }
.wc-crew { display: flex; gap: 0; margin-top: 4px; }
.wc-crew i { width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-style: normal; font-size: 10px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; margin-left: -6px; }
.wc-crew i:first-child { margin-left: 0; } .wc-crew em { font-style: normal; font-size: 12px; color: var(--red); font-weight: 600; }
.wc-card-side { display: grid; justify-items: end; gap: 8px; }
.wc-free { display: grid; place-items: center; padding: 18px; color: var(--muted); } .wc-free span { font-size: 28px; } .wc-free p { margin: 4px 0 0; }
@media (max-width: 760px) {
  .wc-hero { padding: 16px; } .wc-title h3 { font-size: 21px; } .wc-stats { width: 100%; } .wc-stat { flex: 1; min-width: 0; padding: 6px 8px; } .wc-stat b { font-size: 18px; }
  .wc-body { padding: 10px 8px 2px; } .wc-grid { gap: 3px; }
  .wc-day { min-height: 56px; padding: 4px; border-radius: 10px; } .wc-n { width: 22px; height: 22px; font-size: 12px; } .wc-today, .wc-evs, .wc-tip { display: none; }
  .wc-dots { display: flex; padding-left: 3px; } .wc-load { left: 5px; right: 5px; bottom: 3px; }
  .wc-card { grid-template-columns: 52px 1fr; } .wc-card > .fbadge { display: none; } .wc-card-side { grid-column: 1 / -1; justify-items: start; } .wc-card-time b { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .wc-body.slide-next, .wc-body.slide-prev { animation: none; } }
@media (max-width: 760px) {
  .wc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .wc-stat span { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wc-day { padding-bottom: 9px; } .wc-dots { margin-top: auto; margin-bottom: 2px; } .wc-dots i { width: 7px; height: 7px; }
  .wc-legend { padding: 8px 12px 12px; }
}
/* Buscador de cliente en "Nuevo trabajo" */
.cp { display: grid; gap: 8px; margin-top: 6px; }
.cp-sel { display: none; }
.cp-chosen { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--bg); min-height: 44px; }
.cp-chosen small { color: var(--muted); }
.cp-q { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; }
.cp-res { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; }
.cp-it { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 10px; font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.cp-it:hover { border-color: var(--green-2); background: #f3f8fa; } .cp-it.on { border-color: var(--green); background: var(--green-soft); }
.cp-it > span:last-child { display: grid; min-width: 0; } .cp-it small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-k { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--green-soft); flex: none; } .cp-k.l { background: var(--amber-soft); }
.wo-noquote { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
/* Trabajos sin cotización previa (cerrados hablando): tono dorado, sin perder el color de su estado */
.nq-tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #8a5a00; background: #fbecc4; border: 1px solid #f0d58f; border-radius: 999px; padding: 1px 7px; vertical-align: 1px; }
.wc-ev.nq { background: #fdf3d8 !important; } .wc-ev.nq:hover { background: #fbeabd !important; }
.wc-card.nq { background: linear-gradient(90deg, #fff8e6, #fff 55%); border-color: #f0d58f; }
.cal-ev.nq { background: #fdf3d8; }
.tbl tbody tr.nq td:first-child { box-shadow: inset 3px 0 0 #e0b23c; } .tbl tbody tr.nq { background: #fffaf0; }
.week .job.nq { background: #fdf3d8; border-left: 3px solid #e0b23c; }
.nq-leg { display: inline-flex; align-items: center; gap: 6px; } .nq-leg i { width: 10px; height: 10px; border-radius: 3px; background: #f3d27a; }
/* Botón de idioma (todo el CRM): debajo del logo y, en el celular, arriba junto al título */
.lang-seg { display: flex; padding: 3px; margin: 12px 8px 14px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); }
.lang-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 7px 8px; background: none;
  color: #c9ddec; font: inherit; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.lang-seg button span { font-weight: 500; letter-spacing: 0; }
.lang-seg button:hover { color: #fff; background: rgba(255,255,255,.08); }
.lang-seg button.on { background: var(--green-2); color: var(--ink); box-shadow: 0 4px 12px -4px rgba(62,212,239,.6); }
.lang-seg.top { display: none; }
.topbar { gap: 10px; }
@media (max-width: 860px) {
  .sidebar > .lang-seg { display: none; }
  .lang-seg.top { display: flex; margin: 0 0 0 auto; background: #e9eef0; border-color: var(--line); flex: none; order: 2; }
  .lang-seg.top button { color: var(--ink-2); padding: 5px 10px; } .lang-seg.top button span { display: none; }
  .lang-seg.top button.on { color: var(--ink); }
  .topbar { display: flex; flex-wrap: wrap; align-items: center; }
}
/* Nubecita de ayuda (💡): las explicaciones van en un recuadro suave, no sueltas */
.tip { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px 12px 12px; margin: 0 0 14px; border-radius: 18px;
  background: linear-gradient(135deg, #f1f8fb 0%, #f7fbff 100%); border: 1px solid #cfe6ee; box-shadow: 0 8px 22px -18px rgba(10,33,57,.45); max-width: 860px; }
.tip::after { content: ""; position: absolute; left: 26px; bottom: -7px; width: 14px; height: 14px; background: #f3f9fb; border-right: 1px solid #cfe6ee; border-bottom: 1px solid #cfe6ee; transform: rotate(45deg); border-bottom-right-radius: 4px; }
.tip-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 2px 8px -2px rgba(10,111,176,.35); font-size: 16px; }
.tip p { margin: 5px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); font-weight: 450; letter-spacing: .005em; text-wrap: pretty; }
.tip p b, .tip p strong { color: var(--ink); }
.tip.full { grid-column: 1 / -1; }
.drawer .tip, .q-send .tip, .tm-access .tip, .tm-perms .tip, .panel .tip { max-width: none; box-shadow: none; }
.tm-top { align-items: center; } .tm-top .tip { flex: 1; margin: 0; }
.hr-top .tip { flex: 1; margin: 0; }
@media (max-width: 640px) { .tip { padding: 10px 12px 10px 10px; gap: 10px; } .tip p { font-size: 14px; } .tip-ic { width: 28px; height: 28px; font-size: 14px; } }
/* Calendario → al abrir un trabajo: resumen del cliente, mapas y personal */
.wa-sum { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 10px 26px -20px rgba(10,33,57,.4); }
.wa-head { display: flex; align-items: center; gap: 12px; } .wa-head > div { flex: 1; display: grid; min-width: 0; } .wa-head b { font-size: 17px; } .wa-head span { font-size: 13px; color: var(--muted); }
.wa-head > .fbadge { width: 42px; height: 42px; border-radius: 12px; } .wa-head > .fbadge svg { width: 23px; height: 23px; }
.wa-addr { margin: 0; font-weight: 600; color: var(--green); overflow-wrap: anywhere; }
.wa-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; } .wa-btns .btn { min-height: 44px; }
.wa-crew { display: grid; gap: 4px; } .wa-crew small { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wa-crew .wc-crew { align-items: center; gap: 0; } .wa-crew .wc-crew > span { margin-left: 8px; font-size: 13.5px; } .wa-crew em { font-style: normal; color: var(--red); font-weight: 600; }
.wa-av { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; margin-left: -6px; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 10px; font-weight: 800; object-fit: cover; }
.wa-av:first-child { margin-left: 0; }
.rs-crew { display: grid; gap: 6px; } .rs-crew small { color: var(--muted); }
.cc { grid-template-columns: 1fr; } .cc-free { color: var(--green) !important; }
.sidebar > .lang-seg { width: 116px; margin-left: 12px; }
.lang-seg button { font-size: 13px; letter-spacing: .08em; padding: 6px 0; }
/* Hoja que se convierte en PDF (fuera de la vista, ancho carta) */
.pdf-render { position: fixed; left: -10000px; top: 0; width: 816px; background: #fff; z-index: -1; }
.pdf-render .qd-doc { box-shadow: none !important; margin: 0 !important; border-radius: 0 !important; max-width: none !important; width: 816px; }
/* ===================== Gastos: facturas de proveedores (como North Crescent) ===================== */
.exp-daybar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 10px; padding: 10px 12px; }
.exp-daybar > div { display: grid; text-align: center; } .exp-daybar strong { font-size: 18px; color: var(--navy); } .exp-daybar span { font-size: 13px; color: var(--muted); }
.exp-daybar .btn { height: 40px; font-size: 20px; padding: 0; }
.exp-scan { display: grid; grid-template-columns: 58px 1fr; gap: 16px; align-items: center; margin: 0 0 12px; padding: 18px 20px; border-radius: 18px; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 70%, #1d5f8c 100%); box-shadow: 0 14px 30px -18px rgba(18,81,130,.7);
  position: relative; overflow: hidden; transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.exp-scan::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(280px circle at var(--mx, 85%) var(--my, 0%), rgba(62,212,239,.28), transparent 60%); }
@media (hover: hover) { .exp-scan:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -16px rgba(18,81,130,.75); } }
.exp-scan:focus-within { outline: 3px solid var(--green-2); outline-offset: 2px; }
.exp-scan-ico { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: var(--green-2); box-shadow: inset 0 -3px 0 rgba(0,0,0,.08); }
.exp-scan-txt strong { display: block; font-size: 19px; font-weight: 700; }
.exp-scan-txt span { display: block; color: #d7e7f4; font-size: 14.5px; line-height: 1.45; margin-top: 2px; }
.exp-scan.is-busy { opacity: .72; pointer-events: none; }
.exp-busy { margin: 0 0 12px; color: var(--navy); font-weight: 600; }
.exp-busy::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border-radius: 50%; border: 2px solid var(--green); border-right-color: transparent; animation: exp-spin .8s linear infinite; }
@keyframes exp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .exp-busy::before { animation: none; } }
.exp-err { margin: 0 0 12px; color: var(--red); font-weight: 600; }
.exp-gap { margin: 0 0 12px; }
.exp-sum { display: grid; gap: 14px; padding: 18px 20px; }
.exp-big p { margin: 0; color: var(--muted); font-weight: 500; }
.exp-big strong { display: block; font-size: 36px; line-height: 1.15; font-weight: 800; color: var(--navy); letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.exp-big span { color: var(--muted); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.exp-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.exp-cats li { display: grid; grid-template-columns: minmax(150px, 1.2fr) 2fr auto; gap: 12px; align-items: center; }
.exp-cat { font-weight: 600; color: var(--navy); font-size: 14.5px; } .exp-cat .s { display: block; font-weight: 400; font-size: 12.5px; }
.exp-bar { height: 10px; border-radius: 6px; background: #eef2f6; overflow: hidden; }
.exp-bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--green), var(--green-2)); }
.exp-cats .amt, .exp-row .amt { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.exp-h { margin: 18px 0 8px; color: var(--navy); }
.exp-list { padding: 4px 0; }
.exp-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); transition: background-color .15s, box-shadow .15s; }
.exp-row:last-child { border-bottom: 0; }
@media (hover: hover) { .exp-row:hover { background: linear-gradient(90deg, #eef6f9, #f9fbfc 60%); box-shadow: inset 3px 0 0 var(--green-2); } }
.exp-row .t { font-weight: 700; color: var(--green); font-size: 14px; }
.exp-row .m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; } .exp-row .m .s { flex-basis: 100%; font-size: 13px; }
.exp-noprice { color: #8a5d06; font-weight: 600; font-size: 13px; }
.exp-none { padding: 12px 16px; margin: 0; }
.exp-back { display: inline-block; margin: 0 0 8px; font-weight: 600; color: var(--green); text-decoration: none; }
.exp-head h2 { margin: 0; color: var(--navy); } .exp-head p { margin: 4px 0 14px; }
.exp-edit { display: grid; gap: 18px; }
.exp-file { display: grid; gap: 10px; align-content: start; }
.exp-img { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.exp-pdf { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.exp-nofile { padding: 28px 16px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; background: var(--card); margin: 0; }
.exp-form { display: grid; gap: 12px; }
.exp-form label { display: grid; gap: 4px; font-weight: 600; font-size: 13.5px; color: var(--ink); }
.exp-form label > small { font-weight: 400; display: inline; }
.exp-form input, .exp-form select, .exp-form textarea { width: 100%; }
.exp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.exp-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.exp-money { position: relative; } .exp-money span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.exp-money input { padding-left: 26px; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.exp-check { margin: -4px 0 0; font-size: 13.5px; min-height: 1.2em; }
.exp-check.good { color: var(--green); } .exp-check.bad { color: #8a5d06; font-weight: 600; }
.exp-note { margin: 0; }
.exp-reread { display: grid; gap: 4px; justify-items: start; }
.exp-lines summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.exp-lines pre { white-space: pre-wrap; font: inherit; font-size: 13.5px; color: var(--muted); margin: 8px 0 0; }
.exp-save { min-height: 46px; font-size: 15px; }
.exp-del { margin-top: 14px; }
@media (min-width: 900px) { .exp-edit { grid-template-columns: 1fr 1fr; align-items: start; } .exp-file { position: sticky; top: 12px; } }
@media (max-width: 640px) {
  .exp-amounts { grid-template-columns: 1fr 1fr; } .exp-amounts > div:last-child { grid-column: 1 / -1; }
  .exp-cats li { grid-template-columns: 1fr auto; } .exp-bar { grid-column: 1 / -1; grid-row: 2; }
  .exp-scan { grid-template-columns: 48px 1fr; padding: 16px; } .exp-scan-ico { width: 48px; height: 48px; font-size: 23px; }
  .exp-two { grid-template-columns: 1fr; } .exp-row { grid-template-columns: 54px 1fr auto; padding: 12px; }
}
/* Tamaño general en computadora: un poco más alejado (se veía muy grande/pegado). En el celular queda igual. */
@media (min-width: 1024px) {
  body { zoom: .9; }
  /* El visor de la propiedad (mapa con medición) va sin zoom para que el mouse mida exacto */
  .pv-back, .prop-map-tiles { zoom: 1.1112; }
  /* lo que mide el alto de la pantalla se compensa para que siga llegando hasta abajo */
  .app, .login { min-height: calc(100vh / .9); }
  .sidebar { height: calc(100vh / .9); }
  .drawer { height: calc(100vh / .9); }
}

/* Correo de la orden de trabajo: vista previa y avisos */
.wo-mail-frame { width: 100%; min-height: 900px; border: 1px solid var(--line); border-radius: 12px; background: #eef3f8; }
.wo-mail-gaps { margin: 8px 0; padding: 10px 12px 10px 28px; background: #fff7e6; border: 1px solid #f1d39b; border-radius: 10px; font-size: 13px; color: #6b4a10; }
.wo-mail-gaps li + li { margin-top: 4px; }

/* ---- Correos (plantillas + estructura fija) ---- */
.mail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; align-items: start; }
.mail-grid > .panel { margin-bottom: 0; }
.mail-prev { position: sticky; top: 12px; padding: 12px; }
.mail-prev-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 2px 4px 10px; }
.mail-frame { width: 100%; height: 78vh; min-height: 560px; border: 1px solid var(--line); border-radius: 12px; background: #eef3f8; }
/* Vista previa como bandeja de entrada */
.inbox { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.inbox-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; }
.inbox-subj { font-size: 18px; font-weight: 600; color: #1f1f1f; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.inbox-tag { flex: none; font-size: 11px; padding: 2px 7px; border-radius: 4px; background: #eceff1; color: #444; }
.inbox-from { display: flex; align-items: center; gap: 10px; padding: 8px 16px 12px; border-bottom: 1px solid var(--line); }
.inbox-av { width: 40px; height: 40px; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 3px; flex: none; }
.inbox-who { flex: 1; min-width: 0; font-size: 13.5px; color: #1f1f1f; }
.inbox-addr { color: #5f6368; font-size: 12.5px; }
.inbox-to { color: #5f6368; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-time { flex: none; color: #5f6368; font-size: 12px; }
.inbox .mail-frame { border: 0; border-radius: 0; display: block; }
.mail-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: -4px; }
.mail-chips small { color: var(--muted); font-size: 12px; margin-right: 2px; }
.chip-btn { border: 1px solid var(--line); background: #f6f9fa; color: var(--ink-2); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.chip-btn:hover { border-color: var(--green-2); background: var(--green-soft); color: var(--ink); }
.mail-missing .q-banner, .mail-grid .q-banner { margin: 0; }
.mail-kind { margin: 18px 2px 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mail-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mail-tpl { display: block; width: 100%; text-align: left; border: 1px solid var(--line); cursor: pointer; margin: 0; font: inherit; color: inherit; }
.mail-tpl:hover { border-color: var(--green-2); }
.mail-tpl-h { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 4px; }
.mail-tpl-b { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); white-space: pre-line; }
.mail-log td { font-size: 13.5px; }
.mail-log tbody tr { cursor: default; }
@media (max-width: 980px) { .mail-grid { grid-template-columns: 1fr; } .mail-prev { position: static; } .mail-frame { height: 70vh; } }

/* ---- Correos con estilo Gmail (nov 2026) ---- */
.gm { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.gm-rail { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 6px; }
.gm-compose { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; padding: 16px 24px 16px 18px; margin-bottom: 10px;
  border: 0; border-radius: 16px; background: #c2e7ff; color: #001d35; font: 600 15px/1 inherit; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.12); transition: box-shadow .15s, transform .15s; }
.gm-compose:hover { box-shadow: 0 4px 10px rgba(0,0,0,.18); transform: translateY(-1px); }
.gm-compose-ic { font-size: 18px; }
.gm-nav { display: flex; flex-direction: column; gap: 2px; }
.gm-nav-i { display: flex; align-items: center; gap: 14px; width: 100%; padding: 9px 16px; border: 0; border-radius: 0 999px 999px 0; background: none; color: #1f1f1f; font: 500 14px/1.2 inherit; cursor: pointer; text-align: left; }
.gm-nav-i:hover { background: #eaebef; }
.gm-nav-i.on { background: #d3e3fd; color: #041e49; font-weight: 700; }
.gm-nav-ic { width: 20px; text-align: center; }
.gm-nav-l { flex: 1; }
.gm-nav-n { font-size: 12px; font-weight: 600; color: #444746; }
.gm-rail-from { display: flex; gap: 10px; align-items: center; margin-top: 14px; padding: 12px; border-top: 1px solid var(--line); font-size: 12px; color: #5f6368; }
.gm-rail-from img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; padding: 2px; object-fit: contain; }
.gm-rail-from b { display: block; color: #1f1f1f; font-size: 13px; }
.gm-rail-from span { word-break: break-all; }
.gm-main { min-width: 0; }

/* Ventana de mensaje nuevo */
.gm-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.gm-win { background: #fff; border-radius: 12px; box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 2px 6px 2px rgba(60,64,67,.15); overflow: hidden; display: flex; flex-direction: column; }
.gm-win-h { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; background: #f2f8fc; color: #041e49; font-size: 14px; font-weight: 600; }
.gm-win-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #d3e3fd; color: #041e49; }
.gm-row { display: flex; align-items: center; gap: 10px; min-height: 42px; margin: 0 16px; border-bottom: 1px solid #e8eaed; font-size: 14px; }
.gm-row-l { flex: none; width: 52px; color: #5f6368; font-size: 13.5px; }
.gm-row input, .gm-row select { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 8px 0 !important; font-size: 14px; color: #1f1f1f; outline: none; }
.gm-from { color: #5f6368; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-from b { color: #1f1f1f; font-weight: 600; }
.gm-to { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.gm-to .gm-who { flex: 0 1 auto !important; max-width: 100%; padding: 4px 10px !important; border-radius: 999px !important; background: #f1f3f4 !important; font-size: 13px; cursor: pointer; }
.gm-to input { flex: 1 1 180px; }
.gm-picks { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px 4px; }
.gm-pick { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 6px 4px 12px; border: 1px solid #dadce0; border-radius: 999px; background: #fff; font-size: 13px; color: #444746; max-width: 100%; }
.gm-pick[hidden] { display: none; }
.gm-pick-l { flex: none; font-weight: 600; color: #1f1f1f; }
.gm-pick select { border: 0 !important; box-shadow: none !important; background-color: transparent !important; padding: 4px 24px 4px 4px !important; font-size: 13px; max-width: 260px; min-width: 0; }
.gm-win > [class*="mail-missing"], .gm-win > div:not([class]) { margin: 8px 16px 0; }
.gm-body { flex: 1; min-height: 340px; margin: 6px 0 0; padding: 12px 16px !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; resize: vertical;
  font: 14px/1.6 Arial, Helvetica, sans-serif; color: #1f1f1f; outline: none; background: #fff !important; }
.gm-chips { margin: 0; padding: 8px 16px; background: #f8fbfd; border-top: 1px solid #e8eaed; }
.gm-chips[hidden] { display: none; }
.gm-note { margin: 0 16px 8px; padding: 8px 12px; border-radius: 8px; background: #fef7e0; color: #5c4400; font-size: 12.5px; line-height: 1.45; }
.gm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 14px 14px; border-top: 1px solid #e8eaed; }
.gm-send { border: 0 !important; border-radius: 999px !important; padding: 10px 24px !important; background: #0b57d0 !important; color: #fff !important; font-weight: 600 !important; font-size: 14px !important; box-shadow: none !important; cursor: pointer; }
.gm-send:hover { background: #0a4cb8 !important; box-shadow: 0 1px 3px rgba(0,0,0,.25) !important; }
.gm-send:disabled { opacity: .6; }
.gm-tool { min-width: 36px; height: 36px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: #444746; font: 600 14px/1 inherit; cursor: pointer; }
.gm-tool:hover { background: #f1f3f4; }
.gm-tool-txt { font-size: 13px; font-weight: 500; }
.gm-prev { position: sticky; top: 12px; padding: 0; background: none; border: 0; box-shadow: none; }
.gm-prev .mail-prev-h { margin: 4px 6px 10px; }
.gm-prev .inbox { box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 2px 6px 2px rgba(60,64,67,.15); border: 0; }

/* Listas tipo bandeja (Enviados y Plantillas) */
.gm-list { background: #fff; border-radius: 12px; box-shadow: 0 1px 2px rgba(60,64,67,.2); overflow: hidden; margin-bottom: 14px; }
.gm-intro { padding: 12px 14px; }
.gm-intro .actions { margin-top: 10px; }
.gm-list-h { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px; border-bottom: 1px solid #e8eaed; font-size: 14px; }
.gm-item { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr) auto 64px; align-items: center; gap: 14px; width: 100%; padding: 11px 16px; border: 0; border-bottom: 1px solid #f1f3f4;
  background: #fff; font: 14px/1.3 inherit; color: #1f1f1f; text-align: left; cursor: pointer; }
.gm-item:last-child { border-bottom: 0; }
.gm-item:hover { box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0, 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15); position: relative; z-index: 1; }
.gm-item-who { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-item-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gm-item-txt b { font-weight: 600; }
.gm-item-snip { color: #5f6368; }
.gm-item-tag { font-size: 11px; }
.gm-item-when { text-align: right; font-size: 12px; font-weight: 600; color: #444746; }
.gm-empty { padding: 40px 16px; text-align: center; color: #5f6368; }

@media (max-width: 1200px) { .gm-grid { grid-template-columns: 1fr; } .gm-prev { position: static; } }
@media (max-width: 860px) {
  .gm { grid-template-columns: 1fr; }
  .gm-rail { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .gm-compose { margin: 0; padding: 12px 18px; }
  .gm-nav { flex-direction: row; }
  .gm-nav-i { border-radius: 999px; padding: 8px 14px; }
  .gm-rail-from { display: none; }
  .gm-item { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .gm-item-who { grid-column: 1; } .gm-item-when { grid-column: 2; grid-row: 1; }
  .gm-item-txt { grid-column: 1 / -1; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .gm-item-tag { display: none; }
}

/* ===== Fotos: botón ⬇ en cada miniatura y visor con descarga (public/photo-viewer.js) ===== */
a.pv-link { position: relative; display: block; cursor: zoom-in; }
.pv-dl { position: absolute; right: 6px; bottom: 6px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(8,31,48,.72); color: #fff; font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.25); opacity: .9; transition: transform .15s, background .15s, opacity .15s; z-index: 2; }
.pv-dl:hover { background: #0f9d58; transform: scale(1.08); opacity: 1; }
.pa-thumbs .pv-dl, .vs-photos .rp-photos .pv-dl { width: 24px; height: 24px; font-size: 12px; right: 4px; bottom: 4px; }
@media (hover: hover) { a.pv-link .pv-dl { opacity: 0; } a.pv-link:hover .pv-dl, a.pv-link:focus-visible .pv-dl { opacity: .95; } }
body.pv-open { overflow: hidden; }
.pv-back { position: fixed; inset: 0; z-index: 10000; background: rgba(6,20,30,.94); display: flex; flex-direction: column; color: #fff; }
.pv-top { width: 100%; box-sizing: border-box; justify-content: space-between; display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-size: 14px; }
.pv-count { font-weight: 700; opacity: .8; white-space: nowrap; }
.pv-cap { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-x { background: rgba(255,255,255,.12); border: 0; color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.pv-x:hover { background: rgba(255,255,255,.25); }
.pv-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; padding: 0 56px; }
.pv-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #111; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; font-size: 30px; line-height: 1; display: grid; place-items: center; }
.pv-nav:hover { background: rgba(255,255,255,.28); }
.pv-nav.prev { left: 8px; } .pv-nav.next { right: 8px; }
.pv-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
.pv-bar .btn:not(.primary) { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
@media (max-width: 640px) { .pv-stage { padding: 0 6px; } .pv-nav { width: 38px; height: 38px; font-size: 24px; background: rgba(0,0,0,.35); } }
@media print { .pv-dl, .pv-back { display: none !important; } }
.dgroup-h { justify-content: flex-start; gap: 8px; }
.dgroup-h > b { margin-left: auto; }
.dgroup-h .dzip { padding: 3px 10px; font-size: 12px; }

/* ---------- Llamadas (línea 888) y Configuración IVR ---------- */
.q-bar:has(> .seg + .btn) { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.calls-tbl td { vertical-align: middle; }
.calls-tbl .quick { justify-content: flex-end; }
.call-audio audio { width: 220px; max-width: 100%; height: 34px; }
.ivr-status { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ivr-dev .info { margin-bottom: 14px; line-height: 1.9; }
.ivr-dev .info code { background: #fff; border-radius: 6px; padding: 2px 6px; font-size: 12px; word-break: break-all; }
.ivr-dev h4 { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); }
.ivr-days { display: flex; gap: 6px; flex-wrap: wrap; }
.ivr-days .chk { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.ivr-days .chk input { width: auto; margin: 0; }
.ivr-text { grid-column: 1 / -1; background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.ivr-text summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.ivr-text label { display: block; margin-top: 8px; }
.ivr-text textarea { width: 100%; }
@media (max-width: 720px) {
  .table-wrap:has(> .calls-tbl) { overflow: visible; background: none; box-shadow: none; }
  .calls-tbl, .calls-tbl tbody, .calls-tbl tr, .calls-tbl td { display: block; width: 100%; }
  .calls-tbl thead { display: none; }
  .calls-tbl tr { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 10px;
    display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
  .calls-tbl td { border: 0; padding: 0; }
  .calls-tbl td:nth-child(1) { grid-column: 1; grid-row: 2; }
  .calls-tbl td:nth-child(2) { grid-column: 1; grid-row: 1; font-weight: 600; }
  .calls-tbl td:nth-child(4) { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
  .calls-tbl td:nth-child(5), .calls-tbl td:nth-child(6) { grid-column: 1 / -1; margin-top: 6px; }
  .calls-tbl td.hide-sm, .calls-tbl td:nth-child(5):has(> span.sub:only-child) { display: none; }
  .calls-tbl .quick { justify-content: flex-start; }
  .call-audio audio { width: 100%; }
}
.ivr-247 { display: flex; align-items: center; gap: 8px; font-weight: 600; background: var(--teal-soft); border-radius: 10px; padding: 10px 12px; }
.ivr-247 input { width: auto; margin: 0; }
.ivr-music { display: block; width: 100%; height: 32px; margin-top: 6px; }
.ivr-dev .form-grid > label { align-self: start; }
.call-when { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.call-when input, .call-selall input { width: auto; margin: 3px 0 0; }
.call-selall { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 0 6px; cursor: pointer; }
.call-del { color: var(--red); }

/* ================= Contabilidad ================= */
.acc-tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 0 16px; padding: 4px; background: #e7eef3; border-radius: 12px; scrollbar-width: thin; }
.acc-tabs a { flex: 0 0 auto; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.acc-tabs a:hover { background: rgba(255,255,255,.6); }
.acc-tabs a.on { background: #fff; color: var(--navy); box-shadow: 0 1px 4px rgba(10,33,57,.12); }
.acc-filter { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.acc-filter label { min-width: 150px; flex: 0 1 190px; }
.acc-filter .seg { align-self: center; }
.acc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 16px; }
.acc-grid .panel { margin-bottom: 0; }
.acc-grid { margin-bottom: 16px; }
.acc-link { display: block; margin-bottom: 14px; text-decoration: none; font-weight: 600; }
.acc-warn ul { margin: 6px 0 0; padding-left: 18px; }
.acc-warn li { margin: 2px 0; }
.neg { color: var(--red); }
.pos { color: var(--teal); }
.kpi strong.red { color: var(--red); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.acc-tbl td, .acc-tbl th { font-size: 13.5px; }
.acc-tbl tr.off td { opacity: .55; }
.acc-tbl .pill { margin-left: 6px; }
.acc-total td { font-weight: 700; background: #fafcfd; }
.acc-bad td { color: var(--red); font-weight: 700; }
.acc-good td { color: var(--teal); font-weight: 700; }
.acc-mini { width: 100%; margin-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.acc-mini td { padding: 8px 4px; text-align: right; font-variant-numeric: tabular-nums; }
.acc-mini td:first-child { text-align: left; color: var(--muted); }
/* barras */
.acc-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; height: 190px; padding-top: 6px; }
.acc-bar-col { display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-align: center; gap: 3px; }
.acc-bar-pair { display: flex; gap: 3px; align-items: flex-end; justify-content: center; height: 100%; }
.acc-bar { width: 42%; max-width: 22px; border-radius: 5px 5px 2px 2px; min-height: 2px; }
.acc-bar.in, .acc-legend .in::before { background: var(--green); }
.acc-bar.out, .acc-legend .out::before { background: #9fb6c7; }
.acc-bar-col small { color: var(--muted); font-size: 11.5px; }
.acc-bar-col b { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.acc-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.acc-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.acc-legend span:not(.in):not(.out)::before { display: none; }
/* formularios */
.acc-form { display: grid; gap: 12px; }
.acc-form h3 { margin: 0; }
.acc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acc-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; }
.acc-lines { display: grid; gap: 6px; }
.acc-line { display: grid; grid-template-columns: minmax(150px, 2fr) 1fr 1fr minmax(90px, 1.4fr) 32px; gap: 6px; align-items: center; }
.acc-line.acc-head { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: -4px; }
.acc-bill-line { grid-template-columns: minmax(150px, 2fr) minmax(110px, 2fr) 1fr 32px; }
.acc-money { text-align: right; font-variant-numeric: tabular-nums; }
.acc-diff { margin: 0; font-weight: 600; font-size: 13.5px; }
.acc-diff.ok { color: var(--teal); }
.acc-diff.bad { color: var(--red); }
.acc-pay { margin-top: 14px; background: #f8fbfd; }
.acc-settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 14px; }
/* banco */
.acc-bank { display: grid; gap: 10px; }
.acc-bank-row { margin: 0; padding: 12px 14px; }
.acc-bank-h { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: baseline; }
.acc-bank-h .t { font-weight: 600; overflow-wrap: anywhere; }
.acc-amt { font-variant-numeric: tabular-nums; font-size: 16px; }
.acc-match { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: var(--teal-soft); }
.acc-bank-b { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.acc-bank-b > input { flex: 1 1 160px; width: auto; }
.acc-inline { display: flex; align-items: center; gap: 8px; }
.acc-inline select { min-width: 210px; }
.acc-remember { font-weight: 500; font-size: 12.5px; }
.acc-pattern { width: 140px; padding: 5px 8px; font-size: 12.5px; }
.acc-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.acc-mode { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px; }
.acc-ul { margin: 8px 0; padding-left: 18px; font-size: 13.5px; }
.acc-ul li { margin: 3px 0; }
/* reportes */
.acc-rtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.acc-rtabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.acc-rtabs button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.acc-quick { display: flex; flex-wrap: wrap; gap: 6px; align-self: center; }
.acc-report { padding: 22px 24px; }
.acc-rh { text-align: center; margin-bottom: 14px; }
.acc-rh strong { color: var(--muted); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; }
.acc-rh h2 { margin: 2px 0; font-size: 20px; color: var(--navy); }
.acc-rh span { color: var(--muted); font-size: 13px; }
.acc-rt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.acc-rt td { padding: 6px 8px; border-bottom: 1px solid #eef2f5; }
.acc-rt .acc-ind { padding-left: 22px; }
.acc-rt tr.sub td { color: var(--muted); font-size: 12.5px; }
.acc-rt-h td { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--line); }
.acc-rt-sec td { font-weight: 700; color: var(--navy); padding-top: 12px; }
.acc-rt-tot td { font-weight: 700; border-top: 1px solid #cfdbe4; }
.acc-rt-key td { font-weight: 700; background: #f3f8fb; }
.acc-rt-key.big td { font-size: 15px; border-top: 2px solid var(--navy); }
.acc-rt-key.neg td { color: var(--red); }
.acc-export { background: #f8fbfd; }
/* cierre */
.acc-lock { margin-bottom: 14px; }
.acc-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.acc-month { margin: 0; }
.acc-month.closed { background: #f4faf9; }
.acc-month.future { opacity: .6; }
.acc-month-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.acc-checks { list-style: none; margin: 10px 0 0; padding: 0; font-size: 12.5px; }
.acc-checks li { margin: 3px 0; }
.acc-checks li.ok { color: var(--teal); }
.acc-checks li.no { color: #8a5d06; }
.acc-month .acc-actions { margin: 10px 0 0; }
.acc-audit summary { cursor: pointer; font-weight: 600; }
@media (max-width: 760px) {
  .acc-row2, .acc-row3 { grid-template-columns: 1fr; }
  .acc-line, .acc-bill-line { grid-template-columns: 1fr 1fr; }
  .acc-line select { grid-column: 1 / -1; }
  .acc-line.acc-head { display: none; }
  .acc-bank-h { grid-template-columns: 1fr auto; }
  .acc-bank-h .s { grid-column: 1 / -1; }
  .acc-report { padding: 14px 10px; }
  .acc-filter label { flex: 1 1 140px; }
}
@media print {
  body:has(.acc-report) .sidebar, body:has(.acc-report) .topbar, body:has(.acc-report) .acc-noprint, body:has(.acc-report) .tip,
  body:has(.acc-report) #toast, body:has(.acc-report) .bottom-nav { display: none !important; }
  body:has(.acc-report) .view { padding: 0; }
  body:has(.acc-report) .app { display: block; }
  .acc-report { box-shadow: none; padding: 0; }
}
.acc-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; width: 100%; }
.acc-grid a.row { color: inherit; text-decoration: none; }
.acc-export .acc-row2 { max-width: 560px; }
@media (max-width: 900px) { .acc-grid { grid-template-columns: 1fr; } }
