/* Satrix · Gestión de avisos */
:root {
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --ink: #1D1D1F;
  --ink-2: #3A3A3C;
  --muted: #6E6E73;
  --line: #ECECEF;
  --line-2: #F0F0F2;
  --soft: #F0F0F3;
  --blue: #0071E3; --blue-ink: #0059B8; --blue-bg: #E8F1FD;
  --green: #34A853; --green-ink: #1F7A35; --green-bg: #E8F5EC;
  --amber: #E8A317; --amber-ink: #8A5300; --amber-bg: #FFF4E0;
  --red: #D93025; --red-ink: #B3261E; --red-bg: #FDECEA;
  --violet: #8A5CD0; --violet-ink: #6A3FB5; --violet-bg: #F3EDFC;
  --grey: #8E8E93; --grey-bg: #EFEFF2;
  --radius: 18px;
  --shadow: 0 0 0 1px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.04);
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
a { color: #0066CC; text-decoration: none; }
a:hover { color: #004C99; }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; }
h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tnum { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.grow { flex: 1; min-width: 0; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

/* ── Cabecera ── */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.88); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid rgba(0,0,0,0.07); padding: 10px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 7px 12px; border-radius: 9px; }
.nav a.on { background: #EDEDF0; color: var(--ink); font-weight: 600; }
.nav a:hover { background: #F2F2F5; }
.nav-otros { position: relative; }
.nav-otros > summary { list-style: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 7px 12px; border-radius: 9px; user-select: none; }
.nav-otros > summary::-webkit-details-marker { display: none; }
.nav-otros > summary span { font-size: 10px; margin-left: 2px; }
.nav-otros > summary.on { background: #EDEDF0; color: var(--ink); font-weight: 600; }
.nav-otros > summary:hover { background: #F2F2F5; }
.nav-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 170px; background: #fff; border-radius: 12px; padding: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 10px 30px rgba(0,0,0,0.12); display: flex; flex-direction: column; gap: 2px; }
.nav-menu a { display: block; }
.search { flex: 1 1 240px; max-width: 420px; display: flex; align-items: center; gap: 8px; background: #EDEDF0; border-radius: 10px; padding: 0 12px; height: 36px; }
.search input { border: 0; background: transparent; flex: 1; font: inherit; font-size: 14px; outline: none; min-width: 0; color: var(--ink); }
.me { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #E8E8ED; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.me-name { display: flex; flex-direction: column; line-height: 1.15; font-size: 13px; font-weight: 600; }
.me-name span { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.linkbtn { border: 0; background: none; color: #0066CC; font: inherit; font-size: 13px; cursor: pointer; padding: 0; }

.page { max-width: 1600px; margin: 0 auto; padding: 26px 28px 60px; }
.page.narrow { max-width: 1320px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.page-head p { margin-top: 4px; color: var(--muted); }

/* ── Tarjetas ── */
.card { background: var(--card); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.card.tight { padding: 14px 16px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--card); border-radius: 16px; padding: 15px 17px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 5px; color: var(--ink); }
.kpi .lbl { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .val { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi.alerta { box-shadow: 0 0 0 1.5px #F4B4AE; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.azul { background: var(--blue); } .dot.verde { background: var(--green); } .dot.ambar { background: var(--amber); } .dot.rojo { background: var(--red); } .dot.gris { background: var(--grey); } .dot.violeta { background: var(--violet); }

/* ── Chips ── */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chip.azul { color: var(--blue-ink); background: var(--blue-bg); }
.chip.verde { color: var(--green-ink); background: var(--green-bg); }
.chip.ambar { color: var(--amber-ink); background: var(--amber-bg); }
.chip.rojo { color: var(--red-ink); background: var(--red-bg); }
.chip.gris { color: var(--ink-2); background: var(--grey-bg); }
.chip.violeta { color: var(--violet-ink); background: var(--violet-bg); }
.g { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; }
.g.verde { color: var(--green-ink); } .g.rojo { color: var(--red-ink); } .g.ambar { color: var(--amber-ink); }
.ia { font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; color: var(--violet-ink); background: var(--violet-bg); padding: 2px 6px; border-radius: 6px; }

/* ── Botones y formularios ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; padding: 9px 15px; min-height: 38px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--blue); color: #fff; } .btn.primary:hover { background: #0062C4; color: #fff; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.soft { background: var(--soft); color: var(--ink); font-weight: 500; } .btn.soft:hover { background: #E6E6EA; color: var(--ink); }
.btn.outline { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(0,0,0,0.12); font-weight: 500; }
.btn.danger { background: #fff; color: var(--red-ink); box-shadow: 0 0 0 1px rgba(0,0,0,0.12); font-weight: 500; }
.btn.wa { background: #fff; color: var(--green-ink); box-shadow: inset 0 0 0 1.5px var(--green); }
.btn.sm { padding: 6px 11px; min-height: 32px; font-size: 13px; border-radius: 9px; }
.btn.lg { min-height: 52px; font-size: 16px; border-radius: 14px; width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
/* Campos: siempre blancos con borde, para que se distingan del fondo gris (oficina y móvil) */
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], input[type=url], input[type=month], input:not([type]), select, textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 0; border-radius: 10px; padding: 9px 12px; min-height: 40px; outline: none; width: 100%;
  box-shadow: inset 0 0 0 1px #D2D2D7; transition: box-shadow 0.15s, background 0.15s;
}
input:hover, select:hover, textarea:hover { box-shadow: inset 0 0 0 1px #AEAEB4; }
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 2px var(--blue), 0 0 0 4px rgba(0,113,227,0.12); background: #fff; }
input::placeholder, textarea::placeholder { color: #9A9AA0; }
textarea { resize: vertical; min-height: 80px; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.seg { display: inline-flex; background: #E8E8ED; border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg button, .seg label { border: 0; background: transparent; border-radius: 8px; padding: 6px 13px; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.seg .on, .seg input:checked + span { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 0; background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 500; box-shadow: 0 0 0 1px rgba(0,0,0,0.08); }
.pill.on { background: var(--ink); color: #fff; font-weight: 600; box-shadow: none; }
.switch { width: 42px; height: 26px; border-radius: 999px; background: #D1D1D6; position: relative; display: inline-block; border: 0; cursor: pointer; flex-shrink: 0; padding: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: left 0.15s; }
.switch.on { background: var(--green); } .switch.on::after { left: 19px; }

/* ── Flash ── */
.flash { max-width: 1600px; margin: 14px auto 0; padding: 0 28px; }
.flash div { border-radius: 12px; padding: 11px 14px; font-size: 14px; font-weight: 500; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.flash .ok { background: var(--green-bg); color: var(--green-ink); }
.flash .error { background: var(--red-bg); color: var(--red-ink); }
.flash .aviso { background: var(--amber-bg); color: var(--amber-ink); }

/* ── Tablero ── */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; flex: 999 1 760px; min-width: 0; }
.lane { background: #EDEDF0; border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.lane.rojo { background: #FBEDEB; }
.lane-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 2px; }
.lane-head .t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lane-head .t b { font-size: 15px; }
.lane-head .t span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; background: #fff; color: var(--ink-2); padding: 3px 9px; border-radius: 999px; }
.bar { height: 5px; border-radius: 999px; background: #E3E3E8; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.acard { background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
a.acard:hover { box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 6px 18px rgba(0,0,0,0.07); color: var(--ink); }
.acard .t { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.acard .d { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.acard .m { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.nota { font-size: 12.5px; border-radius: 9px; padding: 7px 9px; line-height: 1.35; background: var(--bg); color: var(--ink-2); }
.nota.azul { background: var(--blue-bg); color: var(--blue-ink); } .nota.ambar { background: var(--amber-bg); color: var(--amber-ink); } .nota.verde { background: var(--green-bg); color: var(--green-ink); } .nota.rojo { background: var(--red-bg); color: var(--red-ink); } .nota.violeta { background: var(--violet-bg); color: var(--violet-ink); }

.alerts { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; margin-bottom: 18px; }
.alert { background: #fff; border-radius: 16px; padding: 13px 15px; box-shadow: 0 0 0 1px rgba(0,0,0,0.06); display: flex; align-items: center; gap: 13px; color: var(--ink); }
.alert.rojo { background: #FFF6F5; box-shadow: 0 0 0 1px #F6CFCB; } .alert.ambar { background: #FFF9EE; box-shadow: 0 0 0 1px #F3DDB0; }
.alert .n { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; background: var(--grey-bg); }
.alert.rojo .n { background: var(--red-bg); color: var(--red-ink); } .alert.ambar .n { background: var(--amber-bg); color: var(--amber-ink); }
.alert .tx { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.alert .tx b { font-size: 14.5px; } .alert .tx span { font-size: 12.5px; color: var(--muted); }

.feed-item { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.feed-item:first-of-type { border-top: 0; }
.feed-item .ico { width: 28px; height: 28px; border-radius: 50%; background: var(--blue-bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.list-row:first-child { border-top: 0; }

/* ── Tablas ── */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 10px; border-bottom: 1px solid #F3F3F5; vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t .r { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: #FAFAFB; }

/* ── Programar ── */
.agenda { display: grid; grid-template-columns: 170px repeat(5, minmax(0, 1fr)); gap: 8px; min-width: 700px; }
.cell { border: 0; border-radius: 12px; padding: 10px; min-height: 96px; background: #F7F7F9; display: flex; flex-direction: column; gap: 5px; text-align: left; color: var(--ink); font: inherit; cursor: pointer; }
.cell:hover { background: #F0F0F4; }
.cell.full, .cell.aus { background: #F2F2F4; opacity: 0.7; cursor: not-allowed; }
.cell.ofrecido { background: var(--blue-bg); box-shadow: inset 0 0 0 1.5px #7DB3F0; }
.cell.sel { background: var(--blue-bg); box-shadow: inset 0 0 0 2.5px var(--blue); }
.cell .n { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cell .z { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .k { font-size: 12px; font-weight: 600; }
.k.cerca { color: var(--green-ink); } .k.medio { color: var(--muted); } .k.lejos { color: var(--amber-ink); }
.plist { display: flex; flex-direction: column; gap: 8px; }
.pitem { display: flex; flex-direction: column; gap: 4px; background: #fff; border-radius: 14px; padding: 11px 13px; box-shadow: var(--shadow); color: var(--ink); }
.pitem.on { box-shadow: 0 0 0 2px var(--blue); }

/* ── Fotos ── */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.thumb { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.thumb img, .thumb .ph { width: 100%; height: 92px; object-fit: cover; border-radius: 11px; background: #EEEEF1; display: block; }
.thumb.ok img { box-shadow: 0 0 0 2px var(--green); }

/* ── Línea de estados ── */
.steps { display: flex; align-items: center; min-width: 720px; }
.step { display: flex; align-items: center; flex: 1; }
.step .b { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 92px; font-size: 12px; text-align: center; color: var(--grey); }
.step .c { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px #D1D1D6; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; background: #fff; }
.step.done .c { background: var(--green); box-shadow: none; } .step.done .b { color: var(--ink-2); }
.step.now .c { box-shadow: inset 0 0 0 2px var(--blue); } .step.now .b { color: var(--blue-ink); font-weight: 600; }
.step .ln { flex: 1; height: 2px; background: #E3E3E8; margin-bottom: 20px; }
.step.done .ln { background: var(--green); }

/* ── Móvil (técnico y cliente) ── */
body.movil { background: var(--bg); }
.app { max-width: 520px; margin: 0 auto; padding: 18px 16px 90px; display: flex; flex-direction: column; gap: 14px; }
.app-top { display: flex; align-items: flex-start; justify-content: space-between; padding-top: 8px; }
.app-top small { font-size: 13px; color: var(--muted); font-weight: 500; }
.app-top h1 { font-size: 30px; }
.back { color: #0066CC; font-size: 16px; font-weight: 500; padding: 8px 0; display: inline-block; min-height: 44px; }
.mcard { background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.04); overflow: hidden; }
.mcard > summary, .mcard > .hd { list-style: none; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.mcard > summary::-webkit-details-marker { display: none; }
.mcard[open] { box-shadow: 0 0 0 2px var(--blue), 0 10px 28px rgba(0,113,227,0.14); }
.mcard .bd { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.num { width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.num.done { background: var(--green); }
.timer { background: var(--ink); color: #fff; border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.timer .clock { font-family: var(--mono); font-size: 46px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.timer .btn.soft { background: rgba(255,255,255,0.14); color: #fff; }
.timer .btn.white { background: #fff; color: var(--ink); }
.photo-btn { border: 0; background: #fff; border-radius: 16px; padding: 10px; box-shadow: 0 0 0 1.5px #D1D1D6; display: flex; flex-direction: column; gap: 8px; text-align: left; color: var(--ink); font: inherit; cursor: pointer; position: relative; }
.photo-btn.ok { box-shadow: 0 0 0 2px var(--green); }
.photo-btn .pv { height: 88px; border-radius: 11px; background: #EEEEF1 center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #A1A1A6; font-size: 26px; }
.photo-btn .ck { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; display: none; align-items: center; justify-content: center; }
.photo-btn.ok .ck { display: flex; }
.radio-card { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 13px 15px; box-shadow: 0 0 0 1px rgba(0,0,0,0.08); cursor: pointer; min-height: 56px; }
.radio-card input { width: 20px; height: 20px; accent-color: var(--blue); flex-shrink: 0; }
.radio-card:has(input:checked) { box-shadow: 0 0 0 2px var(--blue); background: #F7FAFF; }
.offline { background: var(--grey-bg); border-radius: 12px; padding: 9px 12px; font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.sticky-bottom { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(245,245,247,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid rgba(0,0,0,0.06); }
.sticky-bottom .in { max-width: 520px; margin: 0 auto; }
.sig { width: 100%; height: 200px; background: #fff; border-radius: 18px; box-shadow: inset 0 0 0 1.5px #D1D1D6; touch-action: none; display: block; }
.tabs-m { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #E8E8ED; border-radius: 12px; padding: 3px; }
.tabs-m a { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.tabs-m a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
#map { height: 300px; border-radius: 18px; overflow: hidden; background: #EEF1F4; }

/* ── Login ── */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth .card { width: 100%; max-width: 400px; padding: 30px; display: flex; flex-direction: column; gap: 16px; }

@media (max-width: 760px) {
  .top { padding: 10px 16px; }
  .page { padding: 20px 16px 50px; }
  .flash { padding: 0 16px; }
  h1 { font-size: 26px; }
  .me-name { display: none; }
}
@media print { .top, .flash, .no-print { display: none !important; } body { background: #fff; } }

/* Barra de pruebas (modo beta y «ver como») */
.barra-pruebas { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 16px; background: #1D1D1F; color: #F5F5F7; font-size: 12.5px; }
.barra-pruebas .bp-beta { background: #FF9F0A; color: #1D1D1F; font-weight: 700; letter-spacing: .04em; border-radius: 6px; padding: 1px 7px; font-size: 11px; }
.barra-pruebas .bp-txt { color: #C7C7CC; }
.barra-pruebas .bp-form { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.barra-pruebas label { color: #C7C7CC; }
.barra-pruebas select { width: auto; min-height: 28px; padding: 2px 8px; font-size: 12.5px; background: #3A3A3C; color: #fff; border-radius: 7px; }
.barra-pruebas .bp-volver { border: 0; background: #0A84FF; color: #fff; border-radius: 7px; padding: 4px 10px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.barra-pruebas label, .barra-pruebas .bp-volver { white-space: nowrap; }
@media (max-width: 600px) {
  .barra-pruebas { padding: 6px 12px; gap: 8px; }
  .barra-pruebas .bp-txt { display: none; }
  .barra-pruebas .bp-form { margin-left: 0; flex: 1; min-width: 0; }
  .barra-pruebas select { flex: 1; min-width: 0; }
}

.novedades { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 50; border: 0; background: var(--ink); color: #fff; font: inherit; font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 999px; box-shadow: 0 6px 24px rgba(0,0,0,.25); cursor: pointer; }

.thumb-wrap { position: relative; display: block; }
.thumb-del { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: var(--red-ink, #C62828); color: #fff; font: 700 14px/1 system-ui; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }

.llevar { display: block; background: var(--amber-bg); color: var(--amber-ink); border-radius: 10px; padding: 7px 10px; font-size: 13.5px; }
.aviso-orden { background: var(--amber-bg); color: var(--amber-ink); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.aviso-orden .linkbtn { color: var(--amber-ink); text-decoration: underline; font-weight: 600; padding: 0; }
.hora-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.seg-garantia { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.seg-garantia label { text-align: center; padding: 10px 8px; font-size: 15px; }
.seg-garantia input, .seg-pago input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.gear { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); }
.gear:hover, .gear.on { background: #EDEDF0; color: var(--ink); }

/* ── Programar v2 ── */
.prog .prog-lista { max-width: 360px; gap: 10px; display: flex; flex-direction: column; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pitem[draggable] { cursor: grab; }
.arrastrando .cell:not([disabled]) { outline: 1.5px dashed #9BC4F0; outline-offset: -3px; }
.ficha-llamada { padding: 0; overflow: hidden; }
.fl-top { padding: 20px 24px 14px; display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: space-between; align-items: flex-start; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; color: var(--muted); }
.fl-nombre { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.fl-tel { font-family: var(--mono); font-size: 21px; font-weight: 500; letter-spacing: .02em; }
.btn.big { min-height: 46px; padding: 11px 18px; font-size: 15px; border-radius: 12px; }
.fl-bloques { padding: 0 24px 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fl-b { background: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fl-b b { font-size: 15px; }
.fl-notas { padding: 0 24px 14px; display: flex; flex-direction: column; gap: 8px; }
.fl-sugeridos { border-top: 1px solid var(--line-2, #EEE); background: #FBFBFC; padding: 14px 24px; display: flex; flex-direction: column; gap: 10px; }
.sug-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sug { border: 0; text-align: left; font: inherit; border-radius: 14px; padding: 12px 14px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--green); display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-height: 74px; }
.sug-dia { font-size: 17px; font-weight: 700; }
.sug-tec { font-size: 13.5px; font-weight: 500; }
.sug-mot { font-size: 12.5px; color: var(--muted); }
.sug.sel { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(0,113,227,.3); }
.sug.sel .sug-mot { color: rgba(255,255,255,.85); }
.fl-barra { border-top: 1px solid var(--line-2, #EEE); padding: 14px 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fl-barra.lista { background: #EEF5FE; }
.fl-barra .grow { flex: 1 1 240px; min-width: 0; font-size: 15px; }
.fl-nota { flex: 1 1 220px; width: auto; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.cell.sugerido { background: #fff; box-shadow: inset 0 0 0 2px var(--green); }
.cell.sugerido .etq { color: var(--green-ink); }
.cell.full { background: var(--red-bg); }
.cell .bar > span { background: var(--grey, #8E8E93); }
.cell.full .bar > span { background: var(--red); }
.cell.sel { background: var(--blue) !important; color: #fff; box-shadow: 0 6px 16px rgba(0,113,227,.35) !important; }
.cell.sel .z, .cell.sel .k, .cell.sel .small, .cell.sel .etq { color: #fff !important; }
.cell.sel .bar > span { background: #fff; }
.cell.over { box-shadow: inset 0 0 0 3px var(--blue) !important; }
.cell .etq { font-size: 11px; font-weight: 700; color: var(--muted); min-height: 13px; }
.leyenda { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 12.5px; color: var(--ink-2); }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda i { width: 16px; height: 16px; border-radius: 5px; display: inline-block; }
@media (max-width: 900px) { .fl-bloques, .sug-grid { grid-template-columns: 1fr; } }

/* ── Planificación ── */
.t-verde { background: #E7F6EC; box-shadow: inset 0 0 0 1px #9FD8B0; }
.t-ambar { background: #FFF4E0; box-shadow: inset 0 0 0 1px #F0C987; }
.t-rojo { background: #FDECEA; box-shadow: inset 0 0 0 1px #F2B8B3; }
.t-gris { background: #ECECEF; }
.t-txt-verde { color: #1F7A35; } .t-txt-ambar { color: #8A5300; } .t-txt-rojo { color: #B3261E; } .t-txt-gris { color: var(--muted); }
.t-verde .bar > span, .bar.t-verde > span { background: #34A853; }
.t-ambar .bar > span, .bar.t-ambar > span { background: #E8A33D; }
.t-rojo .bar > span, .bar.t-rojo > span { background: #D93025; }
.bar.t-verde, .bar.t-ambar, .bar.t-rojo, .bar.t-gris { box-shadow: none; background: #EDEDF0; }
.plan-sem { display: grid; grid-template-columns: 160px repeat(6, minmax(0, 1fr)); gap: 8px; min-width: 900px; }
.plan-cab { display: flex; flex-direction: column; gap: 3px; padding: 2px 4px 6px; color: var(--ink); }
.plan-cab b.hoy, .plan-dia b.hoy { color: #fff; background: var(--blue); border-radius: 999px; padding: 0 8px; align-self: flex-start; }
.plan-cel { border-radius: 12px; padding: 10px 11px; min-height: 84px; display: flex; flex-direction: column; gap: 5px; color: var(--ink); min-width: 0; }
.plan-cel .n { font-size: 17px; font-variant-numeric: tabular-nums; }
.plan-cel .bar, .plan-dia .bar { height: 5px; background: rgba(0,0,0,.08); }
.plan-mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; min-width: 860px; }
.plan-dia { border-radius: 12px; padding: 9px 10px; min-height: 90px; display: flex; flex-direction: column; gap: 5px; color: var(--ink); }
.plan-dia.fuera { opacity: .45; }
.tec-chip { font-size: 10.5px; font-weight: 700; padding: 1px 5px; border-radius: 5px; box-shadow: none !important; }
.plan-diacols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.plan-av { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line-2); color: var(--ink); }
.plan-av .num { width: 22px; height: 22px; border-radius: 50%; background: #F0F0F3; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hueco { border-radius: 10px; padding: 9px 11px; background: #E7F6EC; color: #1F7A35; font-size: 13px; font-weight: 600; }
.plan-cel, .plan-cel:visited, .plan-dia, .plan-dia:visited, .plan-cab, .plan-cab:visited { color: var(--ink); }

.t-pasado { background: #F7F7F9; box-shadow: inset 0 0 0 1px #EDEDF0; }
.t-pasado .bar > span { background: #AEAEB2; }
.plan-av, .plan-av:visited { color: var(--ink); }
.plan-av .num { color: var(--ink-2) !important; background: #E8E8ED !important; }

.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: 0 8px 28px rgba(0,0,0,.25); max-width: 90vw; }
.toast.error { background: var(--red-ink); }
a.llamando { opacity: .6; pointer-events: none; }

/* ── Hoy v2 ── */
.tareas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tarea { background: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; color: var(--ink); min-height: 122px; }
.tarea:visited { color: var(--ink); }
.tarea.t-rojo-b { box-shadow: inset 0 0 0 1.5px #F2B8B3; }
.tarea.t-ambar-b { box-shadow: inset 0 0 0 1.5px #F0C987; }
.tarea .tt { font-size: 13.5px; font-weight: 600; }
.tarea .tn { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.tarea .td { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.tarea .ta { margin-top: auto; font-size: 13.5px; font-weight: 600; color: #0066CC; }
.tec-fila { display: grid; grid-template-columns: 220px minmax(0, 1fr) 230px; gap: 16px; align-items: center; padding: 14px 18px; }
.puntos { display: flex; gap: 3px; }
.puntos span, .leyenda i.p-hecho, .leyenda i.p-curso, .leyenda i.p-pieza, .leyenda i.p-pend { flex: 1; height: 8px; border-radius: 3px; }
.leyenda i.p-hecho, .leyenda i.p-curso, .leyenda i.p-pieza, .leyenda i.p-pend { width: 14px; flex: none; }
.p-hecho { background: #34A853; } .p-curso { background: var(--blue); } .p-pieza { background: #E8A33D; } .p-pend, .p-vacio { background: #E3E3E8; }
.semana5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.numeros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.numeros > div { background: var(--bg); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.numeros b { font-size: 22px; font-variant-numeric: tabular-nums; }
.numeros span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 1100px) { .tareas { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tec-fila { grid-template-columns: 1fr; } }
/* Para subir a marcas */
table.t tr.grupo td { background: var(--grey-bg); padding-top: 8px; padding-bottom: 8px; font-size: 13px; }
/* Teléfono web (Zadarma) */
.tel-led { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #C7C7CC; margin-right: 6px; vertical-align: middle; }
.tel-led.on { background: var(--green-ink); box-shadow: 0 0 0 3px var(--green-bg); }
body.telefono-win { background: var(--bg, #F5F5F7); }
/* Cabecera: que quepa en una línea con el botón de teléfono */
.top { gap: 10px 18px; }
.nav a { padding: 7px 10px; }
.search { flex: 1 1 180px; min-width: 150px; }
.search input[type=search] { background: transparent; box-shadow: none; padding: 0; height: 36px; border-radius: 0; }
.search input[type=search]:focus { background: transparent; box-shadow: none; }
.ico-btn { position: relative; width: 36px; height: 36px; border-radius: 10px; background: #EDEDF0; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ico-btn:hover { background: #E3E3E8; }
.ico-btn .tel-led { position: absolute; top: 6px; right: 6px; margin: 0; width: 7px; height: 7px; }
@media (max-width: 1480px) { .me-name { display: none; } }
@media (max-width: 1260px) { .search { order: 10; flex-basis: 100%; max-width: none; } }
/* Aviso nuevo: buscador de clientes */
.buscador-cli { position: relative; }
.cli-resultados { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 30; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.06); overflow: hidden; }
.cli-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; border: 0; background: #fff; padding: 10px 12px; font: inherit; cursor: pointer; border-top: 1px solid var(--line-2, #eee); }
.cli-item:first-child { border-top: 0; }
.cli-item:hover, .cli-item:focus { background: #F2F2F5; outline: none; }
details.editar > summary { list-style: none; cursor: pointer; display: inline-flex; }
details.editar > summary::-webkit-details-marker { display: none; }

/* ── WhatsApp ── */
.wa-progreso { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px; }
.wa-prog { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 6px; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-size: 13px; font-weight: 500; }
.wa-prog .n { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px #D1D1D6; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.wa-prog.ok { background: var(--green-bg); color: var(--green-ink); }
.wa-prog.ok .n { background: var(--green); box-shadow: none; color: #fff; }
.wa-paso { scroll-margin-top: 80px; }
.wa-num { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12.5px; align-items: center; justify-content: center; margin-right: 9px; vertical-align: 2px; }
.wa-paso-ok { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #fff; font-size: 11px; align-items: center; justify-content: center; margin-left: 6px; vertical-align: 2px; }
.wa-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; background: var(--bg); border-radius: 12px; padding: 12px 14px; }
.wa-info > div { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.wa-copia { display: grid; grid-template-columns: 170px 1fr auto; gap: 10px; align-items: center; }
.wa-copia code { font-family: var(--mono); font-size: 12.5px; background: var(--bg); padding: 7px 10px; border-radius: 8px; overflow-wrap: anywhere; }
@media (max-width: 640px) { .wa-copia { grid-template-columns: 1fr auto; } .wa-copia > span { grid-column: 1 / -1; } }
.wa-lista, .wa-ol { margin: 0; padding-left: 18px; line-height: 1.6; }
.wa-plantillas { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.wa-pl { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; box-shadow: 0 0 0 1px rgba(0,0,0,0.07); }
.wa-movil { background: #EFE7DD; border-radius: 12px; padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 3px; }
.wa-burbuja { background: #fff; border-radius: 9px 9px 4px 4px; padding: 8px 10px 16px; font-size: 13px; line-height: 1.4; position: relative; box-shadow: 0 1px 0.5px rgba(0,0,0,0.13); }
.wa-burbuja p + p { margin-top: 6px; }
.wa-pie { color: #8696A0; font-size: 12px; }
.wa-hora { position: absolute; right: 8px; bottom: 3px; font-size: 10.5px; color: #8696A0; }
.wa-boton { background: #fff; text-align: center; color: #027EB5; font-size: 13.5px; font-weight: 500; padding: 8px; border-radius: 4px; box-shadow: 0 1px 0.5px rgba(0,0,0,0.13); }
.wa-boton:last-child { border-radius: 4px 4px 9px 9px; }
.wa-est { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.wa-est .tk { font-size: 13px; letter-spacing: -3px; padding-right: 3px; }
.wa-est.leido { color: #0A84C6; } .wa-est.entregado, .wa-est.enviado { color: var(--ink-2); }
.wa-est.fallido, .wa-est.baja { color: var(--red-ink); } .wa-est.simulado, .wa-est.preparado { color: var(--muted); font-weight: 500; }
.wa-linea { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.wa-linea .si { color: var(--green-ink); font-weight: 600; }
.wa-msg { padding: 10px 0; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 5px; }
.wa-msg:first-of-type { border-top: 0; }
.wa-entrante { background: #fff; border-radius: 12px; padding: 10px 12px; box-shadow: 0 0 0 1px rgba(0,0,0,0.07); display: flex; flex-direction: column; gap: 6px; }
.wa-entrante .txt { background: #D9FDD3; border-radius: 9px; padding: 7px 10px; font-size: 14px; white-space: pre-wrap; align-self: flex-start; max-width: 100%; }
.nav .badge { display: inline-flex; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; margin-left: 4px; }

/* Sesión abierta desde el panel de Satrix («entrar como soporte») */
.barra-soporte{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:8px 20px;background:#0b0b0c;color:#fff;font-size:13px;line-height:1.4}
.barra-soporte .bs-tag{display:inline-flex;align-items:center;gap:8px;font-family:"Geist Mono",ui-monospace,monospace;font-size:11px;font-weight:600;letter-spacing:.1em}
.barra-soporte .bs-dot{width:8px;height:8px;border-radius:999px;background:#ff5a1f}
.barra-soporte .bs-txt{flex:1 1 280px;min-width:0}
.barra-soporte form{margin:0}
.barra-soporte .bs-salir{height:32px;padding:0 14px;border:0;border-radius:999px;background:#fff;color:#0b0b0c;font:600 13px "Geist",system-ui,sans-serif;cursor:pointer}
.barra-soporte .bs-salir:focus-visible{outline:2px solid #fff;outline-offset:2px}
.wa-accion { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line-2); }
/* «Mi aviso» (página del cliente) */
.mi-pasos { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.mi-pasos li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); text-align: center; position: relative; }
.mi-pasos li:not(:first-child)::before { content: ''; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px; background: #E3E3E8; z-index: 0; }
.mi-pasos li.ok:not(:first-child)::before, .mi-pasos li.ahora:not(:first-child)::before { background: var(--green); }
.mi-pasos .pt { width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #D1D1D6; display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; position: relative; z-index: 1; }
.mi-pasos li.ok .pt { background: var(--green); color: #fff; box-shadow: none; }
.mi-pasos li.ok { color: var(--ink-2); }
.mi-pasos li.ahora .pt { box-shadow: inset 0 0 0 2px var(--blue); color: var(--blue-ink); }
.mi-pasos li.ahora { color: var(--blue-ink); font-weight: 600; }
.doc-fila { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); color: var(--ink); }
.doc-fila:first-of-type { border-top: 0; }
.doc-ico { width: 38px; height: 44px; border-radius: 8px; background: var(--red-bg); color: var(--red-ink); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Planificación (día): acciones bajo cada aviso */
.plan-av-w { position: relative; }
.plan-av-w:has(.plan-acc) .plan-av { padding-right: 96px; }
.plan-acc { position: absolute; right: 0; bottom: 10px; display: flex; gap: 12px; align-items: center; }
.plan-acc form { display: inline; }

/* Hoy: desplegable por técnico */
.tec-d { padding: 0; }
.tec-d > summary { list-style: none; cursor: pointer; padding: 16px 18px; position: relative; }
.tec-d > summary::-webkit-details-marker { display: none; }
.tec-d .tec-flecha { position: absolute; right: 14px; top: 14px; font-size: 11px; color: var(--muted); transition: transform .15s; }
.tec-d[open] .tec-flecha { transform: rotate(180deg); }
.tec-d > summary.tec-fila { padding-right: 34px; }
.tec-det { border-top: 1px solid var(--line-2); padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.tec-paradas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tec-parada { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line-2); }
.tec-parada:first-child { border-top: 0; }
.tec-parada .num { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: #F2F2F4; color: var(--ink-2); }
.tec-parada .num.t-verde { background: var(--green-bg); color: var(--green-ink); }
.tec-parada .num.t-azul { background: var(--blue-bg); color: var(--blue-ink); }
.tec-parada .num.t-ambar { background: var(--amber-bg); color: var(--amber-ink); }

/* Selector múltiple en los filtros */
.multi { position: relative; }
.multi > summary { list-style: none; cursor: pointer; background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px rgba(0,0,0,0.12); padding: 9px 30px 9px 12px; font-size: 14px; color: var(--ink); min-width: 150px; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; font-weight: 400; }
.multi > summary::-webkit-details-marker { display: none; }
.multi > summary::after { content: '▾'; position: absolute; right: 11px; top: 9px; font-size: 11px; color: var(--muted); }
.multi-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; background: #fff; border-radius: 12px; padding: 8px 10px; box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 10px 30px rgba(0,0,0,0.12); display: flex; flex-direction: column; gap: 4px; min-width: 210px; }
.multi-menu label { font-size: 14px; color: var(--ink); font-weight: 400; padding: 5px 2px; cursor: pointer; }
.multi-menu input { width: 18px; height: 18px; }

/* Mi día: cambiar de día */
.dias-m { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* Piezas: imprimir el listado (lo que se ve, con la búsqueda aplicada) */
.solo-print { display: none; }
@media print {
  header.top, .no-print, .flash, .novedades, .toast, .barra-pruebas, .soporte-banner { display: none !important; }
  .solo-print { display: inline; }
  p.solo-print { display: block; }
  body, .page { background: #fff !important; }
  .page { padding: 0 !important; max-width: none !important; }
  .card { box-shadow: none !important; padding: 0 !important; }
  .table-wrap { overflow: visible !important; }
  table.t { font-size: 10pt; }
  table.t a { color: #000; text-decoration: none; }
}

/* ── Microanimaciones (suaves y cortas; desactivadas si el sistema pide menos movimiento) ── */
@keyframes sx-entrar { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sx-aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes sx-bajar { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes sx-crecer { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sx-carga { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
main.page { animation: sx-entrar .28s ease-out both; }
main.app { animation: sx-aparecer .25s ease-out both; } /* sin desplazar: la barra fija de abajo no debe moverse */
.card, .tarea, .mcard, .kpi, .plan-dia, .pitem { animation: sx-entrar .32s ease-out both; }
.tareas > :nth-child(2), .cols .card:nth-child(2) { animation-delay: .04s; }
.tareas > :nth-child(3), .cols .card:nth-child(3) { animation-delay: .08s; }
.tareas > :nth-child(4), .cols .card:nth-child(4) { animation-delay: .12s; }
details[open] > :not(summary) { animation: sx-aparecer .2s ease-out; }
.flash, .toast, .novedades { animation: sx-bajar .25s ease-out both; }
.bar > span, .puntos > span { transform-origin: left; animation: sx-crecer .6s cubic-bezier(.2,.8,.2,1) both; }
.btn, .pill, .pitem, .tarea, .radio-card, .cell, .sug, .linkbtn, .tabs-m a, .nav a, .photo-btn { transition: background .15s, box-shadow .15s, transform .12s, opacity .15s, color .15s; }
.btn:active:not([disabled]), .pill:active, .tarea:active, .radio-card:active, .cell:active:not([disabled]), .sug:active, .photo-btn:active, .tabs-m a:active { transform: scale(.97); }
.tarea:hover, .pitem:hover, .plan-dia:hover { box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 6px 18px rgba(0,0,0,0.07); }
.mcard > summary, .tec-d > summary { transition: background .15s; }
/* Barra fina arriba mientras carga la siguiente pantalla */
.sx-cargando { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000; overflow: hidden; pointer-events: none; }
.sx-cargando::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; background: var(--blue); border-radius: 0 3px 3px 0; animation: sx-carga 1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print { main.page, .card { animation: none !important; } }

/* Hoy: tarjeta de valor de SATrix (gerencia) */
.valor { background: linear-gradient(160deg, #FFFFFF 0%, #F2F7FE 100%); box-shadow: 0 0 0 1px #DCE8FB; display: flex; flex-direction: column; gap: 12px; }
.valor .eyebrow { color: var(--blue-ink); }
.valor-top { display: flex; align-items: center; gap: 14px; }
.valor-pct { display: flex; align-items: baseline; color: var(--blue-ink); line-height: 1; }
.valor-pct b { font-size: 52px; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.valor-pct span { font-size: 24px; font-weight: 600; margin-left: 2px; }
.valor-frase { font-size: 14px; color: var(--ink-2); line-height: 1.3; }
.valor-bar { height: 6px; }
.valor-bar > span { background: var(--blue); }
.valor-lista { display: flex; flex-direction: column; border-top: 1px solid #E3ECFA; }
.valor-lista > div { display: grid; grid-template-columns: 1fr auto 56px; gap: 8px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid #E3ECFA; font-size: 13.5px; color: var(--ink-2); }
.valor-lista b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.valor-lista .tend { justify-self: end; }
.valor-ahorro { display: flex; flex-direction: column; gap: 2px; background: #fff; border-radius: 12px; padding: 10px 12px; box-shadow: 0 0 0 1px #E3ECFA; font-size: 13px; color: var(--ink-2); }
.valor-ahorro b { font-size: 22px; color: var(--green-ink); letter-spacing: -0.02em; }
.tend { font-size: 12px; font-weight: 600; white-space: nowrap; }
.tend.sube { color: var(--green-ink); } .tend.baja { color: var(--red-ink); }
.valor details summary { cursor: pointer; color: #0066CC; }

/* Selector de día común */
.navdia { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.navdia-f { width: 34px; padding: 0; justify-content: center; }
.navdia-fecha { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px #D2D2D7; font-weight: 600; font-size: 14px; color: var(--ink); cursor: pointer; white-space: nowrap; }
.navdia-fecha:hover { box-shadow: inset 0 0 0 1px #AEAEB4; }
.navdia-fecha svg { color: var(--muted); }
.navdia-fecha input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; min-height: 0; padding: 0; box-shadow: none; }
.navdia-hoy { opacity: .45; pointer-events: none; }
.barra-vista { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.barra-vista .izq { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Leyenda de etiquetas */
.leyenda-etq { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12.5px; color: var(--muted); }
.leyenda-etq > span { display: inline-flex; align-items: center; gap: 6px; }

/* Piezas: números de las pestañas y filas que salen al marcarlas */
.pill b { font-weight: 700; margin-left: 2px; }
.pill.on b { color: inherit; }
@keyframes sx-pulso { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.pulso { display: inline-block; animation: sx-pulso .5s ease-out; }
tr.saliendo { transition: opacity .25s, transform .25s; opacity: 0; transform: translateX(12px); }

.leyenda-prog { margin-top: 8px; }
.leyenda-prog summary { cursor: pointer; color: #0066CC; }
.leyenda-prog .chip { margin-right: 4px; }

/* Móvil: cancelar visita (el cliente no puede) */
.cancelar-visita > summary { list-style: none; cursor: pointer; }
.cancelar-visita > summary::-webkit-details-marker { display: none; }

/* Programar: desplegable «Filtrar por etiqueta» */
.filtro-etq > summary { min-width: 0; font-size: 13px; padding: 7px 28px 7px 12px; border-radius: 999px; }
.filtro-etq > summary.activo { background: var(--ink); color: #fff; box-shadow: none; }
.filtro-etq > summary::after { top: 7px; }
.filtro-etq .multi-menu a { padding: 7px 8px; border-radius: 8px; color: var(--ink); font-size: 14px; }
.filtro-etq .multi-menu a:hover { background: #F2F2F5; }
.filtro-etq .multi-menu a.on { background: #EDEDF0; font-weight: 600; }
.filtro-etq .multi-menu a b { color: var(--muted); font-weight: 600; }

/* Técnicos: interruptor «Recibe avisos» */
.interruptor { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.interruptor input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.interruptor .pista { width: 46px; height: 28px; border-radius: 999px; background: #D2D2D7; position: relative; transition: background .2s; flex: none; }
.interruptor .bola { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.interruptor input:checked + .pista { background: var(--green); }
.interruptor input:checked + .pista .bola { transform: translateX(18px); }
.interruptor input:focus-visible + .pista { box-shadow: 0 0 0 3px rgba(0,113,227,.3); }
.tec-cfg.apagado { background: #FAFAFB; }
.tec-cfg.apagado b { color: var(--ink-2); }
.cell.norecibe { background: repeating-linear-gradient(135deg, #F6F6F8, #F6F6F8 6px, #EFEFF2 6px, #EFEFF2 12px); }
.cell.norecibe .z { color: var(--muted); }
[hidden] { display: none !important; }

/* Presupuestos y cobros */
.presu-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.p-linea { display: grid; grid-template-columns: 130px minmax(0, 1fr) 110px 64px 90px 96px 32px; gap: 6px; align-items: end; }
@media (max-width: 1000px) {
  .presu-grid { grid-template-columns: 1fr; }
  .p-linea { grid-template-columns: 1fr 1fr 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
  .p-linea label:nth-child(2) { grid-column: span 2; }
}
.cobro-acc { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.cobro-acc form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cobro-acc input, .cobro-acc select { width: auto; min-height: 32px; padding: 4px 8px; font-size: 13px; }
.pago3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pago3 .radio-card { padding: 12px 8px; gap: 6px; min-width: 0; justify-content: center; }
.pago3 .radio-card b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.pago3 .radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.pago3 .radio-card b { font-size: 15.5px; }

.chip.urgente { background: var(--red); color: #fff; }

/* Menús desplegables por encima de las tarjetas siguientes. La animación de entrada hace que cada tarjeta
   sea su propia capa y la siguiente tapaba el menú abierto de la anterior. Por debajo de la barra fija (20). */
:is(.card, .tarea, .kpi, .plan-dia, .pitem, .mcard):has(details[open], .cli-resultados:not(.hidden)) { position: relative; z-index: 15; }
