/* Estilos de la app del técnico, el panel de socios y la página de verificación.
   Colores y formas del prototipo «App del técnico AmiantOK». */
:root {
  --bg: #F4F7F8; --card: #FFFFFF; --text: #22313D; --head: #0F2A40; --muted: #55636E; --soft: #8A98A3;
  --line: #DCE3E8; --line-2: #B9C5CD;
  --navy: #09375B; --navy-2: #0D4A78; --blue-bg: #EAF1F7;
  --green: #0EAD86; --green-dark: #0A7A5E; --green-bg: #E6F6F0;
  --amber: #6A4B00; --amber-line: #B7791F; --amber-bg: #FFF5DA;
  --red: #B42318; --red-dark: #8A1C12; --red-bg: #FDECEA;
  --r: 18px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--navy); }
a:hover { color: var(--navy-2); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { color: var(--head); margin: 0; }
h1 { font-size: 28px; line-height: 1.2; }
h2 { font-size: 20px; line-height: 1.25; }
h3 { font-size: 17px; }
p { margin: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- barra superior ---------- */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line);
  padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand b { font-size: 20px; font-weight: 800; color: var(--navy); letter-spacing: -0.3px; }
.brand span { font-size: 13px; font-weight: 600; color: var(--muted); }
.avatar {
  all: unset; cursor: pointer; width: 40px; height: 40px; border-radius: 999px; background: var(--blue-bg); color: var(--navy);
  font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none;
}
.avatar:focus-visible, .btn:focus-visible, .opt:focus-visible, .row:focus-visible, .chip:focus-visible { outline: 3px solid #7FB3DD; outline-offset: 2px; }

/* ---------- contenedores ---------- */
.wrap { max-width: 560px; margin: 0 auto; padding: 22px 16px calc(40px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
.wide { max-width: 1180px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.flat { border: 0; }
.section-t { margin: 6px 0 -6px; font-size: 15px; font-weight: 600; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat b { display: block; font-size: 26px; font-weight: 700; color: var(--head); line-height: 1.2; }
.stat span { font-size: 15px; color: var(--muted); }
.stat.warn { background: var(--amber-bg); border-color: var(--amber-bg); }
.stat.warn b, .stat.warn span { color: var(--amber); }
.stat.new { background: var(--green-bg); border-color: var(--green-bg); }
.stat.new b, .stat.new span { color: var(--green-dark); }

/* ---------- botones ---------- */
.btn {
  all: unset; box-sizing: border-box; cursor: pointer; min-height: 48px; padding: 10px 20px; border-radius: 999px;
  font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  background: var(--card); color: var(--navy); border: 1.5px solid var(--line-2);
}
.btn:hover { border-color: var(--navy); }
.btn.primary { background: var(--navy); color: #FFFFFF; border-color: var(--navy); min-height: 56px; font-size: 18px; }
.btn.primary:hover { background: var(--navy-2); }
.btn.green { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn.danger { color: var(--red); border-color: #E7B4AE; }
.btn.small { min-height: 38px; padding: 6px 14px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.off, .btn[disabled]:hover, .btn.off:hover { cursor: not-allowed; background: var(--line); color: var(--muted); border-color: var(--line); }
.linkbtn { all: unset; cursor: pointer; color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btns > .btn { flex: 1 1 auto; }

/* ---------- formularios ---------- */
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; color: var(--head); }
label.f small { font-weight: 400; color: var(--muted); }
.in, select.in, textarea.in {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff;
  font-size: 16px; font-weight: 400; color: var(--text);
}
textarea.in { min-height: 88px; resize: vertical; }
.in:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px #CFE0EE; }
.in[aria-invalid="true"] { border-color: var(--red); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 480px) { .fields { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }
.code-in { font-size: 30px; letter-spacing: 10px; text-align: center; font-weight: 700; }

/* ---------- avisos ---------- */
.note { border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.note b { font-size: 13px; font-weight: 700; }
.note.ok { background: var(--green-bg); color: var(--green-dark); }
.note.warn { background: var(--amber-bg); color: var(--amber); }
.note.bad { background: var(--red-bg); color: var(--red-dark); }
.note.info { background: var(--blue-bg); color: var(--navy); }
.note .t { font-size: 18px; font-weight: 700; color: var(--head); }
.msg { min-height: 1.2em; font-size: 15px; font-weight: 600; color: var(--red); }
.msg.ok { color: var(--green-dark); }
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  background: var(--head); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px;
  max-width: calc(100% - 32px); box-shadow: 0 8px 30px rgba(15, 42, 64, 0.25);
}
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 9px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: currentColor; flex: none; }
.badge.plain::before { display: none; }
/* Estados de los encargos: un color por estado para verlos de un vistazo */
.b-nuevo { background: #F1EAFE; color: #5B21B6; border-color: #DCCBFB; }
.b-ofrecido { background: #FFF1D6; color: #8A5300; border-color: #F6D9A0; }
.b-asignado { background: #E3EEFB; color: #0B4A8B; border-color: #C3D9F3; }
.b-visita { background: #DDF4F6; color: #0B6670; border-color: #B5E3E8; }
.b-firmado { background: #E1F5EC; color: #0A7A5E; border-color: #B7E5D2; }
.b-cancelado, .b-anulado { background: #FDECEA; color: #A3261A; border-color: #F5C7C1; }
.b-zona { background: var(--green-bg); color: var(--green-dark); }
.chip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; }
.chip[aria-pressed="true"] .dot { box-shadow: 0 0 0 2px #fff; }
.d-nuevo { background: #5B21B6; } .d-ofrecido { background: #C27A00; } .d-asignado { background: #0B4A8B; } .d-visita { background: #0B6670; }
.d-firmado { background: #0A7A5E; } .d-cancelado { background: #A3261A; }
.pagar { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 8px 14px; align-items: center; }
.pagar .btn.small { min-height: 34px; padding: 4px 14px; font-size: 14px; white-space: nowrap; }
.ok-txt { color: var(--green-dark); font-weight: 600; }
.b-emitido { background: var(--green-bg); color: var(--green-dark); }

/* ---------- listas de encargos (app) ---------- */
.row {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; display: flex; gap: 14px; align-items: center;
}
.row:hover { border-color: var(--line-2); }
.row .when { flex: none; min-width: 52px; text-align: center; }
.row .when b { display: block; font-size: 19px; color: var(--head); }
.row .when span { font-size: 12px; font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: .3px; }
.row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .main b { font-size: 17px; color: var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .main span { font-size: 15px; color: var(--muted); }
.row .go { flex: none; font-size: 15px; font-weight: 600; color: var(--navy); }
.row.offer { border: 2px solid var(--green); }
.row.sign { background: var(--amber-bg); border-color: var(--amber-bg); }
.row.sign .main b, .row.sign .main span { color: var(--amber); }
.row.mini { padding: 10px 14px; }
.row.mini .main b { font-size: 15px; }
.empty { text-align: center; color: var(--muted); padding: 18px 8px; font-size: 15px; }

/* ---------- ficha ---------- */
.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 8px 12px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.addr { font-size: 24px; line-height: 1.2; font-weight: 700; color: var(--head); }
.quote { font-size: 16px; color: var(--text); background: var(--blue-bg); border-radius: 14px; padding: 12px 14px; }

/* ---------- visita ---------- */
.steps { font-size: 14px; font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: .4px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .del {
  all: unset; cursor: pointer; position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 999px;
  background: rgba(15, 42, 64, 0.75); color: #fff; font-size: 16px; line-height: 26px; text-align: center;
}
.addphoto {
  position: relative; aspect-ratio: 1; border-radius: 12px; border: 2px dashed var(--line-2); color: var(--navy); background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.addphoto input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.opt {
  all: unset; box-sizing: border-box; cursor: pointer; min-height: 48px; padding: 6px 10px; border-radius: 12px; text-align: center;
  font-size: 15px; font-weight: 600; line-height: 1.2; display: flex; align-items: center; justify-content: center;
  color: var(--navy); background: #fff; border: 1.5px solid var(--line-2);
}
.opt[aria-pressed="true"] { font-weight: 700; border-width: 2px; }
.opt.o-no[aria-pressed="true"] { background: var(--green-bg); color: var(--green-dark); border-color: var(--green); }
.opt.o-na[aria-pressed="true"] { background: var(--blue-bg); color: var(--navy); border-color: var(--navy); }
.opt.o-bueno[aria-pressed="true"] { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.opt.o-malo[aria-pressed="true"] { background: var(--red-bg); color: var(--red-dark); border-color: var(--red); }
.el.a-no { border: 1.5px solid var(--green); }
.el.a-na { border: 1.5px solid var(--navy); }
.el.a-bueno { border: 1.5px solid var(--amber-line); }
.el.a-malo { border: 1.5px solid var(--red); }
.sticky-foot {
  position: sticky; bottom: 0; z-index: 10; background: linear-gradient(rgba(244,247,248,0), var(--bg) 22%);
  padding: 22px 0 calc(8px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; margin-top: -10px;
}
.status { margin: 0; font-size: 14px; font-weight: 600; text-align: center; color: var(--muted); }
.status.ok { color: var(--green-dark); }

/* ---------- vista previa del certificado ---------- */
.cert { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px 16px; font: 13px/1.45 Georgia, "Times New Roman", serif; color: #1D2A33; display: flex; flex-direction: column; gap: 8px; }
.cert h4 { margin: 0 0 4px; font: 700 15px/1.3 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--head); }
.cert .bx { display: flex; gap: 8px; align-items: flex-start; }
.cert .bx i { flex: none; width: 13px; height: 13px; margin-top: 3px; border-radius: 3px; border: 1.5px solid var(--soft); background: #fff; box-shadow: inset 0 0 0 2px #fff; }
.cert .bx i.on { border-color: var(--navy); background: var(--navy); }
.cert .sub { padding-left: 21px; display: flex; flex-direction: column; gap: 6px; }
.cert table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.cert td { border-top: 1px solid var(--line); padding: 4px 4px 4px 0; vertical-align: top; }
.cert .fine { font-size: 11.5px; color: #4A5863; }
.cert .sig { border-top: 1px dashed var(--line-2); padding-top: 8px; display: flex; justify-content: space-between; gap: 10px; align-items: flex-end; }
.cert .sig img { max-height: 46px; max-width: 160px; }

/* ---------- firma manuscrita ---------- */
.pad { width: 100%; height: 180px; border: 1.5px dashed var(--line-2); border-radius: 14px; background: #fff; touch-action: none; display: block; }
.firma-img { max-width: 240px; max-height: 90px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }

/* ---------- pantalla de espera ---------- */
.center { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 24px; }
.spin { width: 54px; height: 54px; border-radius: 999px; border: 5px solid var(--line); border-top-color: var(--navy); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bigcheck { width: 72px; height: 72px; }

/* ---------- panel de socios ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { all: unset; cursor: pointer; padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--muted); font-size: 15px; }
.tab[aria-current="page"] { background: var(--blue-bg); color: var(--navy); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { all: unset; cursor: pointer; padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--line-2); background: #fff; font-size: 14px; font-weight: 600; color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip em { font-style: normal; opacity: .75; margin-left: 4px; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: 15px; }
.tbl th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 700; padding: 10px 12px; background: #FAFBFC; 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 td { background: #F8FAFB; }
.tbl .sub { display: block; font-size: 13px; color: var(--muted); }
.cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { border-bottom: 1px solid var(--line); padding: 8px 4px; }
  .tbl td { border: 0; padding: 3px 10px; }
}
.zonas { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 12px; }
.zonas .check { font-size: 14px; font-weight: 400; color: var(--text); }
.tecs { display: flex; flex-direction: column; gap: 8px; }
.tecs .check { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.hist li { display: flex; flex-direction: column; border-left: 3px solid var(--line); padding-left: 10px; }
.hist small { color: var(--muted); }
details.more > summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.searchbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.searchbar .in { max-width: 320px; }
.cert h5 { margin: 6px 0 0; font: 700 13px/1.3 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--navy); }
.cat-box { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.cat-box:empty { display: none; }
.cat-box.ok { background: var(--green-bg); color: var(--green-dark); border-radius: 12px; padding: 10px 12px; }
.cat-box.warn { background: var(--amber-bg); color: var(--amber); border-radius: 12px; padding: 10px 12px; }
.cat-box.info { background: var(--blue-bg); color: var(--navy); border-radius: 12px; padding: 10px 12px; }
.cat-opts { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow-y: auto; margin-top: 4px; }
.cat-opts .chip { font-weight: 600; font-size: 13.5px; }
.stat.s-nuevo { border-left: 6px solid #5B21B6; } .stat.s-nuevo b { color: #5B21B6; }
.stat.s-ofrecido { border-left: 6px solid #C27A00; } .stat.s-ofrecido b { color: #8A5300; }
.stat.s-asignado { border-left: 6px solid #0B4A8B; } .stat.s-asignado b { color: #0B4A8B; }
.stat.s-firmado { border-left: 6px solid #0A7A5E; } .stat.s-firmado b { color: #0A7A5E; }

/* Equipo: cifras por técnico */
.tbl th.num, .tbl td.num { text-align: right; }
.tbl td.num .sub { text-align: right; }
.tiles4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat.s-firmado { border-left: 6px solid #0A7A5E; } .stat.s-firmado b { color: #0A7A5E; }
.b-devuelto { background: #F1F3F5; color: #55636E; border-color: #DCE3E8; }
.datos-tec { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--text); }
@media (max-width: 900px) {
  .tbl td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 13px; }
  .tbl td[data-l] .sub { display: inline; margin-left: 6px; }
  .tbl td.num, .tbl td.num .sub { text-align: left; }
}

/* ---------- guía de bienvenida del técnico (guia.js) ---------- */
body.sin-scroll { overflow: hidden; }
.ayuda-btn {
  all: unset; cursor: pointer; width: 40px; height: 40px; border-radius: 999px; border: 1.5px solid var(--line-2); color: var(--navy);
  font-size: 19px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; background: #fff;
}
.ayuda-btn:focus-visible { outline: 3px solid #7FB3DD; outline-offset: 2px; }
.top-der { display: flex; align-items: center; gap: 8px; }
.guia {
  position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; justify-content: center;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); animation: guia-entra .22s ease-out;
}
.guia.fuera { opacity: 0; transition: opacity .18s; }
@keyframes guia-entra { from { opacity: 0; transform: translateY(12px); } }
.guia-in { width: 100%; max-width: 560px; display: flex; flex-direction: column; min-height: 0; }
.guia-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px 6px; min-height: 48px; }
.guia-cont { font-size: 14px; font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: .4px; }
.guia-saltar { font-size: 16px; color: var(--muted); }
.guia-pista { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.guia-paso {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 18px; padding: 4px 20px 0; overflow-y: auto;
  opacity: 0; transform: translateX(40px); pointer-events: none; transition: opacity .25s, transform .25s;
}
.guia-paso.antes { transform: translateX(-40px); }
.guia-paso.on { opacity: 1; transform: none; pointer-events: auto; }
.guia-dib {
  flex: none; height: min(46vh, 360px); border-radius: 24px; background: var(--blue-bg);
  display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 18px;
}
.guia-tx h2 { font-size: 26px; line-height: 1.2; margin-bottom: 10px; }
.guia-tx p { font-size: 18px; line-height: 1.5; color: var(--text); }
.guia-tx b { color: var(--head); }
.guia-pie { padding: 12px 20px 18px; display: flex; flex-direction: column; gap: 14px; }
.guia-puntos { display: flex; justify-content: center; gap: 8px; }
.guia-puntos button { all: unset; cursor: pointer; width: 9px; height: 9px; border-radius: 999px; background: var(--line-2); transition: width .2s, background .2s; }
.guia-puntos button[aria-current="true"] { width: 26px; background: var(--navy); }
.guia-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.guia-btns .btn { min-height: 56px; font-size: 18px; }
@media (max-height: 640px) { .guia-dib { height: 38vh; } .guia-tx h2 { font-size: 22px; } .guia-tx p { font-size: 16px; } }

/* maquetas de los dibujos */
.mk-tel {
  position: relative; width: 210px; height: 100%; max-height: 330px; background: #fff; border-radius: 28px; border: 6px solid var(--head);
  box-shadow: 0 14px 34px rgba(9, 55, 91, .18); overflow: hidden; display: flex; flex-direction: column;
}
.mk-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 70px; height: 14px; background: var(--head); border-radius: 0 0 10px 10px; }
.mk-top { display: flex; align-items: center; gap: 5px; padding: 20px 12px 8px; border-bottom: 1px solid var(--line); }
.mk-top svg { width: 16px; height: 16px; }
.mk-top b { font-size: 13px; color: var(--navy); }
.mk-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mk-paso { font-size: 9px; font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: .3px; }
.mk-h { font-size: 15px; color: var(--head); line-height: 1.15; margin-top: -4px; }
.mk-sub { font-size: 10px; color: var(--muted); margin-top: -6px; }
.mk-ok { background: var(--green-bg); color: var(--green-dark); border-radius: 10px; padding: 7px 9px; display: flex; flex-direction: column; }
.mk-ok small { font-size: 8px; font-weight: 700; } .mk-ok b { font-size: 14px; color: var(--head); }
.mk-linea { height: 7px; border-radius: 4px; background: var(--line); } .mk-linea.corta { width: 60%; }
.mk-btn {
  display: flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--navy); color: #fff;
  font-size: 11px; font-weight: 700; min-height: 26px; padding: 4px 10px; text-align: center;
}
.mk-btn.grande { min-height: 34px; font-size: 13px; margin-top: auto; }
.mk-btn.claro { background: #fff; color: var(--navy); border: 1.5px solid var(--line-2); }
.mk-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mk-caja { border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.mk-caja small { font-size: 10px; font-weight: 700; color: var(--head); }
.mk-campo { border: 1.5px solid var(--line-2); border-radius: 8px; font-size: 10px; padding: 5px 7px; color: var(--text); }
.mk-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.mk-fotos span { aspect-ratio: 1; border-radius: 8px; background: linear-gradient(135deg, #C9D6DF, #9FB3C1); }
.mk-fotos .mk-mas { background: #fff; border: 1.5px dashed var(--line-2); font-size: 9px; font-weight: 700; color: var(--navy); display: flex; align-items: center; justify-content: center; }
.mk-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mk-opts span { border: 1.5px solid var(--line-2); border-radius: 7px; font-size: 8.5px; font-weight: 600; color: var(--navy); padding: 5px 3px; text-align: center; line-height: 1.15; }
.mk-opts span.on { background: var(--green-bg); color: var(--green-dark); border-color: var(--green); }
.mk-cert { border: 1px solid var(--line); border-radius: 6px; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.mk-cert i { height: 5px; border-radius: 3px; background: var(--line); } .mk-cert i.corta { width: 55%; }
.mk-cert em { align-self: flex-end; font: italic 13px Georgia, serif; color: var(--navy); border-top: 1px dashed var(--line-2); padding-top: 2px; }
.mk-check { display: flex; gap: 6px; align-items: center; font-size: 10px; font-weight: 600; color: var(--head); }
.mk-check i { font-style: normal; width: 15px; height: 15px; border-radius: 4px; background: var(--navy); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.mk-mail { width: 100%; max-width: 330px; background: #fff; border-radius: 18px; box-shadow: 0 14px 34px rgba(9, 55, 91, .16); overflow: hidden; }
.mk-mail-h { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.mk-mail-h div { display: flex; flex-direction: column; min-width: 0; }
.mk-mail-h b { font-size: 14px; color: var(--head); }
.mk-mail-h small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-av { width: 34px; height: 34px; border-radius: 999px; background: var(--green); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.mk-mail-b { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.mk-mail-b dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; }
.mk-mail-b dt { color: var(--muted); } .mk-mail-b dd { margin: 0; font-weight: 600; }
.mk-mail-b .mk-btn { align-self: flex-start; font-size: 13px; min-height: 34px; padding: 6px 16px; }
.mk-hola { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.mk-logo svg { display: block; filter: drop-shadow(0 8px 18px rgba(14, 173, 134, .35)); }
.mk-ruta { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.mk-ruta li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--navy); width: 56px; }
.mk-ruta span { width: 34px; height: 34px; border-radius: 999px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.mk-ayuda { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 330px; }
.mk-tarjeta { background: #fff; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 6px 18px rgba(9, 55, 91, .10); }
.mk-tarjeta b { color: var(--head); font-size: 15px; } .mk-tarjeta small { color: var(--muted); font-size: 13px; }
.mk-brillo { animation: brillo 1.6s ease-in-out infinite; }
.mk-brillo2 { animation: brillo 1.6s ease-in-out .8s infinite; }
@keyframes brillo { 0%, 100% { box-shadow: 0 0 0 0 rgba(14, 173, 134, .55); } 50% { box-shadow: 0 0 0 7px rgba(14, 173, 134, 0); } }

/* pistas sobre los botones */
.pista-capa { position: fixed; inset: 0; z-index: 90; }
.pista-hueco {
  position: fixed; border-radius: 16px; cursor: pointer; box-shadow: 0 0 0 9999px rgba(9, 25, 40, .62);
  outline: 3px solid var(--green); outline-offset: 2px; animation: hueco 1.6s ease-in-out infinite;
}
@keyframes hueco { 50% { outline-offset: 6px; } }
.pista-globo {
  position: fixed; background: #fff; border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .3); animation: guia-entra .2s ease-out;
}
.pista-globo b { font-size: 18px; color: var(--head); }
.pista-globo p { font-size: 16px; line-height: 1.45; }
.pista-n { font-size: 12px; font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: .4px; }
.pista-btns { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 6px; }
.pista-btns .linkbtn { color: var(--muted); font-size: 15px; }
.pista-flecha { position: absolute; width: 16px; height: 16px; background: #fff; transform: translateX(-50%) rotate(45deg); }
.pista-flecha.arriba { top: -7px; } .pista-flecha.abajo { bottom: -7px; }
.acceso-guia { cursor: pointer; font: inherit; color: inherit; flex-direction: row; gap: 14px; align-items: center; justify-content: flex-start; text-align: left; width: 100%; }
.acceso-guia:hover { border-color: var(--line-2); }
.acceso-guia .ico { width: 44px; height: 44px; border-radius: 999px; background: var(--green-bg); color: var(--green-dark); font-size: 22px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.acceso-guia b { display: block; color: var(--head); font-size: 16px; } .acceso-guia span { font-size: 14px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .guia, .guia-paso, .pista-globo { animation: none; transition: none; }
  .mk-brillo, .mk-brillo2, .pista-hueco { animation: none; }
}

/* ---------- Mapa del panel (debajo de la lista de encargos) ---------- */
.mp-sec { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.mp-sec:empty { display: none; }
.mp-ico { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 999px; vertical-align: -1px; }
.mp-ico.sq { border-radius: 4px; }
.mp-ico.big { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; }
.mp-ico.sq.big { border-radius: 11px; }
.mp-filtros { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.mp-f { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; color: var(--head); padding: 4px 2px; }
.mp-f em { font-style: normal; color: var(--muted); font-weight: 400; }
.mp-f[aria-pressed="false"] { color: var(--soft); text-decoration: line-through; }
.mp-f[aria-pressed="false"] .mp-ico { opacity: .3; }
.mp-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.mp-box { position: relative; background: #EEF4F8; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
#mp { display: block; width: 100%; height: auto; aspect-ratio: 1001 / 992; max-height: 78vh; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
#mp:active { cursor: grabbing; }
#mp-com path { fill: #FFFFFF; stroke: #C9D6DF; stroke-width: calc(1px * var(--u, 1)); }
#mp-com path.zona { fill: #D5F1E7; }
#mp .mp-contorno { fill: none; stroke: #8FA6B6; stroke-width: calc(1.4px * var(--u, 1)); pointer-events: none; }
#mp-nom text { fill: #8A98A3; font-weight: 600; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: calc(3px * var(--u, 1)); }
#mp-lin line { stroke: #0B4A8B; stroke-width: calc(1.6px * var(--u, 1)); stroke-linecap: round; opacity: .55; pointer-events: none; }
#mp-lin line.l-fi { stroke: #7D8B96; opacity: .35; stroke-dasharray: calc(4px * var(--u, 1)) calc(4px * var(--u, 1)); }
#mp-lin line.l-of { stroke: #C27A00; opacity: .8; stroke-dasharray: calc(2px * var(--u, 1)) calc(5px * var(--u, 1)); }
#mp-lin line.sel { opacity: 1; stroke-width: calc(2.6px * var(--u, 1)); }
#mp-lin line.dim { opacity: .08; }
#mp .mk { cursor: pointer; transition: opacity .15s; }
#mp .mk:focus { outline: none; }
#mp .mk circle, #mp .mk rect { stroke: #fff; stroke-width: 2.5px; filter: drop-shadow(0 1px 1.5px rgba(15, 42, 64, .35)); }
#mp .mk text { fill: #fff; font-size: 11px; font-weight: 800; text-anchor: middle; pointer-events: none; }
#mp .mk-t.aprox rect { stroke-dasharray: 4 3; }
#mp .mk:hover circle, #mp .mk:hover rect, #mp .mk.sel circle, #mp .mk.sel rect { stroke: var(--head); stroke-width: 3.5px; }
#mp .mk.dim { opacity: .18; }
.mp-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.mp-zoom button { all: unset; cursor: pointer; width: 38px; height: 38px; border-radius: 11px; background: #fff; border: 1px solid var(--line-2); text-align: center; line-height: 38px; font-size: 21px; font-weight: 700; color: var(--navy); }
.mp-zoom button:hover { border-color: var(--navy); }
.mp-panel { gap: 10px; }
.mp-panel h3 { font-size: 16px; margin-top: 4px; }
.mp-panel p { margin: 0; }
.mp-lista { display: flex; flex-direction: column; gap: 2px; }
.mp-fila { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 10px; font-size: 14.5px; color: var(--text); text-decoration: none; }
.mp-fila:hover, .mp-fila:focus-visible { background: #F1F5F8; }
.mp-fila b { display: block; font-weight: 600; color: var(--head); }
.mp-fila small { display: block; color: var(--muted); font-size: 13px; }
.mp-cab { display: flex; gap: 12px; align-items: center; }
.note .mp-fila { color: var(--amber); padding-left: 0; }
.note .mp-fila b { color: var(--amber); }
@media (max-width: 900px) { .mp-cols { grid-template-columns: 1fr; } #mp { max-height: none; } }
