/* Visitas look nuevo. Solo se carga con CORTINAS_VISITAS_LOOK=1.
   Colores de marca ya definidos en app.css (--b, --a, --g). */
body.vv2-bar{background:#fff}
body.visitas-v2{background:#fff}
body.visitas-v2 main{max-width:none;padding:0;background:#fff}
body.visitas-v2.con-barra-inf,
body.vv2-bar.con-barra-inf{padding-bottom:calc(78px + env(safe-area-inset-bottom,0px))}
body.visitas-v2{padding-bottom:calc(168px + env(safe-area-inset-bottom,0px))}

.vv2{max-width:720px;margin:0 auto;padding:14px 18px 12px;color:#111827}
.vv2-top{background:#111827;color:#fff;min-height:56px;padding:0 16px;display:flex;align-items:center;gap:10px;position:sticky;top:0;z-index:40}
.vv2-top .brand{color:#fff;text-decoration:none;display:flex;align-items:center}
.vv2-top .brand img,.vv2-top .logomaestro{height:28px;width:auto;background:transparent;border-radius:0}
.vv2-top .sp{flex:1}
.vv2-avatar{width:32px;height:32px;border-radius:50%;background:#f59e0b;color:#111;font-weight:800;display:flex;align-items:center;justify-content:center;font-size:13px;letter-spacing:.02em}
.vv2-back{color:#fff;display:flex;align-items:center;justify-content:center;width:36px;height:36px;text-decoration:none}
.vv2-back svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.vv2-ht{font-weight:700;font-size:17px;flex:1}
.vv2-dots{margin-left:auto;background:transparent;border:0;color:#fff;width:36px;height:36px;display:flex;align-items:center;justify-content:center;cursor:pointer}
.vv2-dots svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2}
.vv2-top .barra-sup{margin-left:0}
.vv2-top .vv2-ht{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.vv2-fecha{font-size:13px;color:#6b7280;margin:0}
.vv2 h1{font-size:26px;font-weight:800;margin:0 0 14px;letter-spacing:-.02em;color:#111827}
.vv2-busca{display:flex;align-items:center;gap:10px;background:#f3f4f6;border-radius:99px;padding:4px 8px 4px 16px;color:#6b7280;margin-bottom:12px;box-shadow:0 1px 3px #0000000d}
.vv2-busca svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.vv2-busca input{flex:1;border:0;background:transparent;padding:10px 0;font-size:15px;min-width:0;outline:none;box-shadow:none}
.vv2-filtrar{margin-left:auto;display:flex;align-items:center;gap:5px;color:#111827;font-weight:700;font-size:13.5px;border:0;border-left:1px solid #d1d5db;background:transparent;border-radius:0;padding:8px 12px;cursor:pointer;white-space:nowrap}
.vv2-filtrar svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.vv2-chips{display:flex;gap:8px;margin:0 -18px 6px;padding:0 18px 4px;overflow-x:auto}
.vv2-chips a{border:1px solid #e5e7eb;border-radius:99px;padding:7px 14px;font-size:13.5px;font-weight:600;background:#fff;color:#374151;text-decoration:none;white-space:nowrap}
.vv2-chips a.on{background:#111827;color:#fff;border-color:#111827}
.vv2-chips a b{color:#f59e0b;margin-left:4px;font-weight:800}
.vv2-oculto{font-size:12px;color:#9ca3af;margin:2px 0 0}
.vv2-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
.vv2-grupo{font-size:15px;font-weight:800;margin:16px 0 8px;display:flex;justify-content:space-between;align-items:baseline}
.vv2-grupo small{font-size:12.5px;color:#6b7280;font-weight:500}
.vv2-card{background:#fff;border-radius:16px;padding:14px 14px 14px 16px;margin-bottom:10px;display:flex;align-items:center;gap:12px;box-shadow:0 2px 10px #0f172a14,0 0 0 1px #0f172a0a;color:#111827;text-decoration:none}
.vv2-card:focus{outline:3px solid #f59e0b;outline-offset:2px}
.vv2-av{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:15px;flex:0 0 auto}
.vv2-card .m{flex:1;min-width:0}
.vv2-card .n,.vv2-card .s,.vv2-fila .k,.vv2-fila .v{display:block}
.vv2-card .n{font-weight:700;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vv2-card .s{font-size:13.5px;color:#6b7280;margin-top:2px}
.vv2-chip{display:inline-flex;align-items:center;gap:5px;border-radius:99px;padding:4px 10px;font-size:12px;font-weight:700;white-space:nowrap}
.vv2-chip::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.c-nueva{background:#eff6ff;color:#1d4ed8}.c-asig{background:#fff7ed;color:#c2410c}.c-visit{background:#ecfdf5;color:#047857}.c-cotiz{background:#f5f3ff;color:#6d28d9}.c-post{background:#fef2f2;color:#b91c1c}
.av-nueva{background:#eff6ff;color:#1d4ed8}.av-asig{background:#fff7ed;color:#c2410c}.av-visit{background:#ecfdf5;color:#047857}.av-cotiz{background:#f5f3ff;color:#6d28d9}.av-post{background:#fef2f2;color:#b91c1c}
.vv2-vacio{background:#fff;border-radius:16px;padding:18px;box-shadow:0 2px 10px #0f172a14,0 0 0 1px #0f172a0a}
.vv2-pag a{color:#111827;font-weight:700;text-decoration:none;margin-right:14px}
.vv2-panel{background:#fff;border-radius:16px;padding:12px 14px;margin:0 0 12px;box-shadow:0 2px 10px #0f172a14,0 0 0 1px #0f172a0a}
.vv2-panel label{font-weight:700;font-size:13px;color:#374151;margin:.45rem 0 .15rem;display:block}
.vv2-panel select,.vv2-panel input{width:100%;border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;font-size:15px}
.vv2-panel .row{display:flex;gap:8px;margin-top:10px}
.vv2-panel button,.vv2-panel a.sec{flex:1;text-align:center;border-radius:12px;padding:12px;font-weight:800;text-decoration:none;border:0;cursor:pointer}
.vv2-panel button{background:#111827;color:#fff}
.vv2-panel a.sec{background:#f3f4f6;color:#111827}

.vv2-pie{position:fixed;left:0;right:0;bottom:calc(66px + env(safe-area-inset-bottom,0px));z-index:25;padding:14px 18px 8px;background:linear-gradient(#fff0,#fff 28%);display:flex;justify-content:center}
.vv2-pie .cta{width:min(720px,100%);background:#c2410c;color:#fff;font-weight:800;font-size:17px;border-radius:14px;padding:15px;text-align:center;box-shadow:0 6px 16px #c2410c40;text-decoration:none;display:flex;align-items:center;justify-content:center;gap:8px;border:0;cursor:pointer}
.vv2-pie .cta.v{background:#14532d;box-shadow:0 6px 16px #14532d40}
body.vv2-sheet-open .vv2-pie{display:none}

.vv2-tabs{position:fixed;left:0;right:0;bottom:0;z-index:30;height:66px;background:#fff;border-top:1px solid #eef0f3;display:flex;align-items:center;padding:0 6px env(safe-area-inset-bottom,0px);box-shadow:none}
.vv2-tabs a{flex:1;color:#9ca3af;font-size:13px;font-weight:700;display:flex;flex-direction:column;align-items:center;gap:3px;text-decoration:none;min-width:0;position:relative;white-space:nowrap;overflow:visible;letter-spacing:0;padding:0 2px}
@media (max-width:360px){.vv2-tabs a{font-size:12px;padding:0 1px}}
.vv2-tabs a.on{color:#111827;font-weight:800}
.vv2-tabs a svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.vv2-tabs a.on svg{color:#f59e0b;stroke-width:2.4}
.vv2-tabs .bd{position:relative;display:flex}
.vv2-tabs .bd i{position:absolute;top:-6px;right:-8px;background:#c2410c;color:#fff;font-style:normal;font-size:9.5px;font-weight:800;border-radius:99px;padding:0 4px;line-height:14px}

.vv2-dn{font-size:26px;font-weight:800;letter-spacing:-.02em;margin:2px 0 2px}
.vv2-dsub{color:#6b7280;font-size:14px;margin:0 0 14px}
.vv2-estado,.vv2-filas{background:#fff;border-radius:16px;box-shadow:0 2px 10px #0f172a14,0 0 0 1px #0f172a0a;margin-bottom:12px}
.vv2-estado{padding:14px 16px}
.vv2-estado .tt{font-size:12.5px;color:#6b7280;font-weight:600}
.vv2-estado .now{font-size:17px;font-weight:800;margin:2px 0 12px}
.vv2-prog{display:flex;align-items:center}
.vv2-prog .p{display:flex;flex-direction:column;align-items:center;gap:6px;width:62px;font-size:11.5px;color:#9ca3af;font-weight:600;flex:0 0 auto}
.vv2-prog .p i{width:22px;height:22px;border-radius:50%;background:#e5e7eb;display:flex;align-items:center;justify-content:center;color:#fff;font-style:normal;font-size:12px;font-weight:800}
.vv2-prog .p.done i{background:#14532d}.vv2-prog .p.done{color:#111827}
.vv2-prog .p.cur i{background:#f59e0b;box-shadow:0 0 0 5px #f59e0b33}.vv2-prog .p.cur{color:#111827;font-weight:800}
.vv2-prog .l{flex:1;height:3px;background:#e5e7eb;margin:0 -8px 22px;border-radius:2px}
.vv2-prog .l.done{background:#14532d}
.vv2-fila{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid #eef0f3;color:#111827;text-decoration:none}
.vv2-fila:last-child{border-bottom:0}
.vv2-fila svg{color:#6b7280;width:20px;height:20px;flex:0 0 auto;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.vv2-fila .m{flex:1;min-width:0}
.vv2-fila .k{font-size:12px;color:#6b7280}
.vv2-fila .v{font-size:15px;font-weight:600}
.vv2-fila .ch{color:#9ca3af;font-size:20px;text-decoration:none}
.vv2-redondo{width:40px;height:40px;border-radius:50%;background:#f3f4f6;display:flex;align-items:center;justify-content:center;color:#111827;text-decoration:none}
.vv2-redondo.wa{background:#ecfdf5;color:#047857}
.vv2-dos{display:flex;gap:8px}
.vv2-acc{background:#fff;border-radius:16px;box-shadow:0 2px 10px #0f172a14,0 0 0 1px #0f172a0a;margin-bottom:12px}
.vv2-acc summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;padding:14px 16px;font-weight:700;font-size:15px}
.vv2-acc summary::-webkit-details-marker{display:none}
.vv2-acc summary::after{content:"›";color:#9ca3af;font-size:20px;font-weight:400}
.vv2-acc[open] summary::after{content:"˅";font-size:14px}
.vv2-acc .cuerpo{padding:0 16px 14px;border-top:1px solid #eef0f3}
.vv2-borrar{text-align:center;margin:8px 0 18px}
.vv2-borrar summary{color:#b91c1c;font-weight:700;font-size:14px;cursor:pointer;display:inline}
.vv2-borrar summary::-webkit-details-marker{display:none}
.vv2-mas{background:#fff;border-radius:16px;box-shadow:0 8px 24px #0f172a22;padding:8px;margin:0 0 12px}
.vv2-mas a,.vv2-mas button{display:block;width:100%;text-align:left;background:#fff;color:#111827;border:0;border-bottom:1px solid #eef0f3;padding:12px;font-weight:700;text-decoration:none;border-radius:0;cursor:pointer}
.vv2-mas form{margin:0}

.vv2-pasos{display:flex;gap:5px;margin:0 0 6px}
.vv2-pasos i{flex:1;height:4px;border-radius:99px;background:#e5e7eb}
.vv2-pasos i.on{background:#c2410c}
.vv2-paso{font-size:12.5px;color:#6b7280;font-weight:600;margin-bottom:6px}
.vv2 h2{font-size:26px;font-weight:800;letter-spacing:-.02em;margin:6px 0 6px;color:#111827}
.vv2-ayuda{font-size:14px;color:#6b7280;margin:0 0 16px}
.vv2-campo{display:flex;gap:10px;align-items:center;border:2px solid #111827;border-radius:14px;padding:4px 14px}
.vv2-campo svg{color:#6b7280;width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;flex:0 0 auto}
.vv2-campo input{flex:1;border:0;padding:12px 0;font-size:16px;outline:none;background:transparent;box-shadow:none}
.vv2-tit{font-size:12.5px;color:#6b7280;font-weight:700;margin:18px 0 6px;text-transform:uppercase;letter-spacing:.04em}
.vv2-it{display:flex;gap:12px;align-items:center;padding:12px 2px;border:0;border-bottom:1px solid #eef0f3;background:#fff;width:100%;text-align:left;cursor:pointer;border-radius:0;color:#111827}
.vv2-it .m{flex:1;min-width:0}
.vv2-it .n,.vv2-it .s{display:block}
.vv2-it .n{font-weight:700;font-size:15.5px}
.vv2-it .s{font-size:13px;color:#6b7280;font-weight:500}
.vv2-it .av{width:40px;height:40px;border-radius:50%;background:#f3f4f6;display:flex;align-items:center;justify-content:center;font-weight:800;color:#374151;flex:0 0 auto}
.vv2-it.sel{background:#fff7ed;border-radius:14px;padding:12px;border-bottom:0;box-shadow:0 0 0 2px #c2410c}
.vv2-it .ok{width:22px;height:22px;border-radius:50%;background:#c2410c;color:#fff;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;margin-left:auto}
.vv2-it.nuevo{color:#14532d;font-weight:700}
.vv2-it.nuevo .av{background:#ecfdf5;color:#14532d;font-size:22px}
.vv2 label.blk{display:block;font-weight:700;margin:.7rem 0 .25rem}
.vv2 input.txt,.vv2 select,.vv2 textarea{width:100%;border:1px solid #e5e7eb;border-radius:14px;padding:13px 14px;font-size:16px;background:#fff}
.vv2-rev p{margin:.45rem 0}
.vv2-rev b{display:block;font-size:.85rem;color:#6b7280;font-weight:700}
.vv2-extra{margin:18px 0;border-radius:16px;box-shadow:0 2px 10px #0f172a14,0 0 0 1px #0f172a0a;background:#fff}
.vv2-extra summary{padding:14px 16px;font-weight:800;cursor:pointer}

@media (min-width:800px){
  body.visitas-v2{background:#f3f4f6}
  body.visitas-v2 main{background:transparent}
  .vv2{background:#fff;min-height:calc(100vh - 56px);box-shadow:0 0 0 1px #0f172a0a}
  .vv2-pie{left:50%;right:auto;transform:translateX(-50%);width:min(720px,100%)}
  .vv2-tabs{left:50%;right:auto;transform:translateX(-50%);width:min(720px,100%);border-left:1px solid #eef0f3;border-right:1px solid #eef0f3}
}
