/* CERTEVA · estilos comunes */
:root {
  --azul: #06223F;
  --azul-2: #172B45;
  --verde: #287C80;
  --verde-osc: #1F6468;
  --verde-claro: #3FB8B4;
  --gris: #AAB7C4;
  --humo: #F3F5F9;
  --texto: #1B2B3E;
  --texto-2: #4A5B6E;
  --linea: #D9E0E8;
  --rojo: #B3261E;
  --rojo-fondo: #FCEDEC;
  --ambar: #8A5300;
  --ambar-fondo: #FFF4DE;
  --ok-fondo: #E4F3F2;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--azul);
  color: var(--texto);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
body.dentro { background: var(--humo); }
h1, h2, h3 { font-family: Montserrat, system-ui, sans-serif; margin: 0; }
button, input { font: inherit; }
.oculto { display: none !important; }

/* ---------- Pantallas de afuera (entrar, registrarse) ---------- */
.afuera {
  min-height: 100vh; min-height: 100dvh;
  max-width: 460px; margin: 0 auto;
  padding: calc(26px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}
.marca { text-align: center; color: var(--humo); padding-top: 2vh; }
.marca img { width: 84px; height: 84px; border-radius: 20px; display: block; margin: 0 auto 14px; }
.marca h1 { font-weight: 800; font-size: 30px; letter-spacing: 0.14em; padding-left: 0.14em; margin-bottom: 6px; }
.marca .eslogan { font-family: Montserrat, system-ui, sans-serif; font-weight: 600; font-size: 15px; color: var(--verde-claro); margin: 0; }
.marca.chica img { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 8px; }
.marca.chica h1 { font-size: 20px; margin-bottom: 0; }
.pie { margin-top: auto; padding-top: 24px; text-align: center; color: var(--gris); font-size: 13px; }
.pie button { background: none; border: 0; color: var(--gris); text-decoration: underline; padding: 6px; cursor: pointer; font-size: 13px; }

/* ---------- Tarjetas y formularios ---------- */
.tarjeta { background: #fff; border-radius: 18px; padding: 20px 18px 18px; margin-top: 20px; }
.afuera .tarjeta { background: var(--humo); }
.tarjeta h2 { font-size: 19px; font-weight: 700; color: var(--azul); margin-bottom: 4px; }
.tarjeta .sub { color: var(--texto-2); font-size: 15px; margin: 0 0 14px; }
.tarjeta p { margin: 0 0 12px; color: var(--texto-2); font-size: 15px; }
.tarjeta p:last-child { margin-bottom: 0; }

.campo { display: block; margin-bottom: 14px; }
.campo span { display: block; font-size: 14px; font-weight: 600; color: var(--azul); margin-bottom: 5px; }
.campo input {
  width: 100%; border: 1.5px solid var(--linea); border-radius: 12px; background: #fff; color: var(--texto);
  padding: 13px 14px; font-size: 16px; outline: none;
}
.campo input:focus { border-color: var(--verde); box-shadow: 0 0 0 3px rgba(40,124,128,0.18); }
.campo small { display: block; color: var(--texto-2); font-size: 13px; margin-top: 5px; }
.con-ojo { position: relative; }
.con-ojo input { padding-right: 86px; }
.con-ojo button {
  position: absolute; right: 6px; top: 6px; bottom: 6px; border: 0; background: transparent;
  color: var(--verde); font-weight: 600; font-size: 14px; padding: 0 10px; cursor: pointer; border-radius: 8px;
}

.boton {
  display: block; width: 100%; border: 0; border-radius: 12px; background: var(--verde); color: #fff;
  font-weight: 600; font-size: 16px; padding: 14px 16px; cursor: pointer; text-align: center;
}
.boton:active { background: var(--verde-osc); }
.boton[disabled] { opacity: 0.6; cursor: default; }
.boton.suave { background: transparent; color: var(--verde); border: 1.5px solid var(--verde); }
.boton.suave:active { background: var(--ok-fondo); }
.boton + .boton { margin-top: 10px; }
.enlace { background: none; border: 0; color: var(--verde); font-weight: 600; font-size: 15px; padding: 10px 6px; cursor: pointer; }
.fila-enlaces { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.fila-enlaces.centro { justify-content: center; }

.aviso { overflow-wrap: anywhere; border-radius: 12px; padding: 11px 13px; font-size: 14.5px; margin-bottom: 14px; }
.aviso.mal { background: var(--rojo-fondo); color: var(--rojo); }
.aviso.ok { background: var(--ok-fondo); color: var(--verde-osc); }
.aviso.ojo { background: var(--ambar-fondo); color: var(--ambar); }
.aviso .enlace { padding: 4px 0 0; display: block; }

/* ---------- Asistente ---------- */
.pasos-puntos { display: flex; gap: 6px; justify-content: center; margin: 18px 0 0; }
.pasos-puntos i { width: 28px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.25); display: block; }
.pasos-puntos i.hecho { background: var(--verde-claro); }
.oficios { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 14px; }
.oficio {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; color: var(--texto);
  border: 1.5px solid var(--linea); border-radius: 14px; padding: 12px 14px; cursor: pointer; min-width: 0;
}
@media (max-width: 350px) { .oficio { gap: 8px; padding: 11px 10px; } .oficio .icono { width: 24px; font-size: 20px; } }
.oficio .icono { font-size: 24px; line-height: 1; flex: 0 0 auto; width: 30px; text-align: center; }
.oficio .txt { flex: 1 1 auto; min-width: 0; }
.oficio b { display: block; font-size: 16px; color: var(--azul); overflow-wrap: break-word; }
.oficio small { display: block; color: var(--texto-2); font-size: 13.5px; }
.oficio.elegido { border-color: var(--verde); background: var(--ok-fondo); box-shadow: 0 0 0 3px rgba(40,124,128,0.18); }
.oficio.pronto { cursor: default; background: transparent; border-style: dashed; }
.oficio.pronto b { color: var(--texto-2); }
.oficio .mini {
  flex: 0 0 auto; border: 1.5px solid var(--verde); background: transparent; color: var(--verde);
  border-radius: 10px; padding: 7px 10px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.oficio .mini[disabled] { border-color: transparent; color: var(--verde-osc); cursor: default; padding-right: 0; }
.titulo-grupo { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texto-2); margin: 16px 0 8px; }

/* ---------- Adentro (con sesión) ---------- */
.barra {
  background: var(--azul); color: var(--humo);
  padding: calc(14px + env(safe-area-inset-top)) 18px 16px;
  display: flex; align-items: center; gap: 12px;
}
.barra img { width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto; }
.barra .nombres { flex: 1 1 auto; min-width: 0; }
.barra .negocio { font-family: Montserrat, system-ui, sans-serif; font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra .quien { font-size: 13px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cuerpo { max-width: 560px; margin: 0 auto; padding: 4px 16px calc(28px + env(safe-area-inset-bottom)); }
.cuerpo .tarjeta { box-shadow: 0 1px 2px rgba(6,34,63,0.06); }
.modulos { list-style: none; margin: 0; padding: 0; }
.modulos li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--linea); }
.modulos li:first-child { border-top: 0; }
.modulos .icono { font-size: 22px; width: 30px; text-align: center; flex: 0 0 auto; }
.modulos .txt { flex: 1 1 auto; min-width: 0; }
.modulos b { display: block; color: var(--azul); font-size: 15.5px; }
.modulos small { color: var(--texto-2); font-size: 13.5px; }
.chip { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--texto-2); background: var(--humo); border-radius: 999px; padding: 4px 9px; }
.dato { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--linea); font-size: 15px; }
.dato:first-of-type { border-top: 0; }
.dato span:first-child { color: var(--texto-2); flex: 0 1 auto; min-width: 0; }
.dato span:last-child { color: var(--texto); font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.detalle { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--linea); font-size: 14px; color: var(--texto-2); }
.detalle li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.detalle .res { flex: 0 0 auto; font-weight: 600; }
.res.ok { color: var(--verde); } .res.mal { color: var(--rojo); } .res.ojo { color: var(--ambar); }
.cargando { color: var(--gris); text-align: center; padding: 40vh 20px 0; font-size: 15px; }
body.dentro .cargando { color: var(--texto-2); }

/* ---------- v0.4: menú de abajo, Mi negocio, avisos ---------- */
body.dentro { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
.barra { position: sticky; top: 0; z-index: 5; }
.barra img.logo-negocio { background: #fff; object-fit: contain; padding: 2px; }
a.boton { text-decoration: none; }
.boton.chico { display: inline-block; width: auto; padding: 10px 14px; font-size: 15px; }
.menu-abajo {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex;
  background: #fff; border-top: 1px solid var(--linea); padding-bottom: env(safe-area-inset-bottom);
}
.menu-abajo a {
  flex: 1 1 0; min-width: 0; text-align: center; text-decoration: none; color: var(--texto-2);
  font-size: 12.5px; font-weight: 600; padding: 8px 4px 9px; border-top: 3px solid transparent; margin-top: -1px;
}
.menu-abajo a .icono { display: block; font-size: 21px; line-height: 1.25; }
.menu-abajo a.activo { color: var(--verde-osc); border-top-color: var(--verde); }

.campo textarea, .campo select {
  width: 100%; border: 1.5px solid var(--linea); border-radius: 12px; background: #fff; color: var(--texto);
  padding: 12px 14px; font: inherit; font-size: 16px; outline: none; resize: vertical; line-height: 1.4;
}
.campo textarea:focus { border-color: var(--verde); box-shadow: 0 0 0 3px rgba(40,124,128,0.18); }
.campo input[type=color] { padding: 4px; height: 48px; cursor: pointer; }
.campo input[disabled], .campo textarea[disabled] { background: var(--humo); color: var(--texto-2); }
.dos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.nota { display: block; color: var(--texto-2); font-size: 13.5px; margin: -6px 0 14px; }

.logo-fila { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.logo-caja {
  flex: 0 0 auto; width: 84px; height: 84px; border-radius: 14px; border: 1.5px dashed var(--linea); background: #fff;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.logo-caja img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.logo-caja i { font-style: normal; font-size: 12.5px; color: var(--texto-2); }
.logo-botones { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }

.previa { border: 1px solid var(--linea); border-radius: 12px; overflow: hidden; background: #fff; }
.previa-cabeza { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.previa-cabeza img { width: 38px; height: 38px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; flex: 0 0 auto; }
.previa-cabeza b { font-family: Montserrat, system-ui, sans-serif; font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
.previa-linea { height: 5px; }
.previa-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; color: var(--texto-2); letter-spacing: 0.05em; }
.previa-pie b { font-size: 16px; letter-spacing: 0; }

.guardar-fijo {
  position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 4; margin: 16px -16px 0; padding: 10px 16px 12px;
  background: linear-gradient(to top, var(--humo) 70%, rgba(243,245,249,0));
}
.guardar-fijo .aviso { margin-bottom: 8px; box-shadow: 0 2px 8px rgba(6,34,63,0.12); }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(148px + env(safe-area-inset-bottom)); z-index: 20;
  max-width: calc(100% - 32px); background: var(--azul); color: #fff; border-radius: 999px; padding: 10px 18px; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(6,34,63,0.3); text-align: center;
}
.toast.mal { background: var(--rojo); }
.capa { position: fixed; inset: 0; z-index: 30; background: rgba(6,34,63,0.55); display: flex; align-items: flex-end; justify-content: center; }
.hoja {
  width: 100%; max-width: 520px; background: #fff; border-radius: 20px 20px 0 0;
  padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
}
.hoja h2 { font-size: 19px; color: var(--azul); margin-bottom: 6px; }
.hoja p { margin: 0 0 16px; color: var(--texto-2); font-size: 15px; }

/* ---------- v0.5: Clientes ---------- */
.titulo-fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.titulo-fila h2 { margin: 0; }
.buscador { margin-bottom: 12px; }
.volver { display: inline-block; margin: 14px 0 -8px; padding: 6px 4px; color: var(--verde-osc); font-weight: 600; font-size: 15px; text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tarjeta.lista { padding: 4px 18px; }
.lista .item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 0; border: 0; border-top: 1px solid var(--linea);
  background: none; text-align: left; text-decoration: none; color: var(--texto); cursor: pointer; font: inherit;
}
.lista .item:first-child { border-top: 0; }
.lista.dentro-tarjeta .item:first-child { border-top: 1px solid var(--linea); }
.lista .txt { flex: 1 1 auto; min-width: 0; }
.lista b { display: block; color: var(--azul); font-size: 16px; overflow-wrap: anywhere; }
.lista small { display: block; color: var(--texto-2); font-size: 14px; overflow-wrap: anywhere; }
.lista .flecha { flex: 0 0 auto; color: var(--gris); font-size: 22px; line-height: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.chips .chip { font-style: normal; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.acciones .boton { margin-top: 0; flex: 1 1 auto; }
.notas { background: var(--humo); border-radius: 10px; padding: 10px 12px; margin-top: 10px !important; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--texto) !important; }
.enlace.peligro { color: var(--rojo); }
.modulos .boton.chico { flex: 0 0 auto; padding: 8px 14px; }
.hoja { max-height: 92vh; max-height: 92dvh; overflow-y: auto; }
.menu-abajo a { font-size: 12px; }

/* ---------- v0.6: Precios y "Más" ---------- */
.pestanas { display: flex; gap: 6px; margin-top: 16px; background: #E4E9F0; border-radius: 12px; padding: 4px; }
.pestanas a { flex: 1 1 0; min-width: 0; text-align: center; text-decoration: none; color: var(--texto-2); font-weight: 600; font-size: 15px; padding: 9px 6px; border-radius: 9px; }
.pestanas a.activa { background: #fff; color: var(--azul); box-shadow: 0 1px 2px rgba(6,34,63,0.12); }
.pestanas + .tarjeta { margin-top: 14px; }
.lista .precio { flex: 0 0 auto; font-weight: 700; color: var(--azul); font-size: 16px; white-space: nowrap; }
.chip.viejo { background: var(--ambar-fondo); color: var(--ambar); }
.chip.grande { font-size: 16px; padding: 5px 12px; color: var(--azul); }
.lista.con-icono .icono { flex: 0 0 auto; width: 30px; text-align: center; font-size: 22px; }
.campo select { height: 50px; }
.hoja .nota { margin: 0 0 14px; }
.tarjeta .boton + .boton { margin-top: 10px; }

/* ---------- v0.7: Presupuestos ---------- */
.menu-abajo a { font-size: 11.5px; padding-left: 2px; padding-right: 2px; }
.linea { border: 1.5px solid var(--linea); border-radius: 12px; padding: 10px; margin-bottom: 10px; background: #FBFCFE; }
.linea-arriba { display: flex; gap: 8px; align-items: center; }
.linea input[type=text] { border: 1.5px solid var(--linea); border-radius: 9px; background: #fff; color: var(--texto); padding: 9px 10px; font-size: 16px; outline: none; min-width: 0; width: 100%; }
.linea input[type=text]:focus { border-color: var(--verde); }
.l-desc { flex: 1 1 auto; font-weight: 600; }
.l-quitar { flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 9px; background: var(--humo); color: var(--texto-2); font-size: 15px; cursor: pointer; }
.linea-abajo { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.linea-abajo label { flex: 1 1 0; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--texto-2); }
.linea-abajo label:first-child { flex: 0 0 62px; }
.linea-abajo label input { margin-top: 3px; }
.l-sub { flex: 0 0 auto; min-width: 74px; text-align: right; font-weight: 700; color: var(--azul); padding-bottom: 10px; font-size: 15px; white-space: nowrap; }
.dos-botones { display: flex; gap: 8px; }
.dos-botones .boton { flex: 1 1 0; margin-top: 0; padding-left: 6px; padding-right: 6px; }
.tilde { display: flex; align-items: center; gap: 9px; font-size: 15px; color: var(--texto); padding: 8px 0; cursor: pointer; }
.tilde input { width: 20px; height: 20px; accent-color: var(--verde); flex: 0 0 auto; }
.tilde i { font-style: normal; color: var(--texto-2); }
.tilde.chico { font-size: 13.5px; padding: 8px 0 0; color: var(--texto-2); }
.descuento-fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--linea); }
.descuento-fila .pct { flex: 0 0 auto; color: var(--texto-2); font-weight: 600; }
.descuento-fila .pct input { width: 62px; border: 1.5px solid var(--linea); border-radius: 9px; padding: 8px; font-size: 16px; text-align: right; outline: none; }
.sugerencias { margin-bottom: 8px; }
.sugerencia { display: block; width: 100%; text-align: left; background: var(--ok-fondo); border: 0; border-radius: 10px; padding: 9px 12px; margin-bottom: 6px; cursor: pointer; font: inherit; }
.sugerencia b { display: block; color: var(--azul); }
.sugerencia small { color: var(--texto-2); font-size: 13.5px; }
.elegido-caja { display: flex; align-items: center; gap: 10px; background: var(--ok-fondo); border-radius: 12px; padding: 11px 12px; }
.elegido-caja .txt { flex: 1 1 auto; min-width: 0; }
.elegido-caja b { display: block; color: var(--azul); overflow-wrap: anywhere; }
.elegido-caja small { display: block; color: var(--texto-2); font-size: 13.5px; overflow-wrap: anywhere; }
.sub-bloque { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--linea); }
.barra-total { display: flex; justify-content: space-between; align-items: baseline; background: #fff; border-radius: 12px; padding: 9px 14px; margin-bottom: 8px; box-shadow: 0 2px 8px rgba(6,34,63,0.12); color: var(--texto-2); font-weight: 600; }
.barra-total b { font-size: 20px; color: var(--azul); font-family: Montserrat, system-ui, sans-serif; }
.dato.fuerte span { font-size: 17px; font-weight: 700 !important; color: var(--azul) !important; }
.renglon { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--linea); font-size: 15px; }
.renglon:first-child { border-top: 0; }
.renglon span { min-width: 0; overflow-wrap: anywhere; }
.renglon i { font-style: normal; color: var(--texto-2); }
.renglon b { flex: 0 0 auto; color: var(--azul); white-space: nowrap; }
.chip.estado { background: #E4E9F0; color: var(--azul); }
.chip.estado.e-aprobado, .chip.estado.e-listo, .chip.estado.e-entregado, .chip.estado.e-terminado { background: var(--ok-fondo); color: var(--verde-osc); }
.chip.estado.e-rechazado { background: var(--rojo-fondo); color: var(--rojo); }
.lista .item.tocado { background: var(--ok-fondo); }
.notas.interna { background: var(--ambar-fondo); }
.dato a { color: var(--verde-osc); font-weight: 600; }
.aviso .enlace { color: inherit; text-decoration: underline; }
.tarjeta .dos-botones .boton + .boton { margin-top: 0; }

/* ---------- v0.8: la obra (días, ayudantes, traslado, imprevistos) ---------- */
.linea-abajo label:first-child { flex: 1 1 0; }
.linea-abajo label:first-child:not(:only-of-type) { flex: 0 0 62px; }
#zonaTraslado .enlace { display: block; padding: 6px 0; text-align: left; }
#zonaTraslado small.nota { display: block; }

/* ---------- Estados de un trabajo: filtros de la lista y botones para cambiarlo ---------- */
.filtros, .estados { display: flex; flex-wrap: wrap; gap: 8px; }
.filtros { margin-top: 14px; }
.filtro { font: inherit; font-size: 14px; font-weight: 600; color: var(--texto-2); background: var(--humo); border: 1.5px solid transparent; border-radius: 999px; padding: 8px 13px; cursor: pointer; max-width: 100%; }
.filtro.activo { background: var(--azul); color: #fff; }
.estados .filtro { flex: 1 1 40%; padding: 12px 10px; border-radius: 12px; font-size: 15px; border-color: var(--linea); background: #fff; color: var(--azul); }
.estados .filtro.activo { background: var(--azul); border-color: var(--azul); color: #fff; }
.historial { list-style: none; margin: 14px 0 0; padding: 0; font-size: 14px; color: var(--texto-2); }
.historial li { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid var(--linea); }
.historial li b { color: var(--texto); flex: 1 1 auto; min-width: 0; }
.historial li span { flex: 0 0 auto; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Cobros de un trabajo ---------- */
.avance { height: 8px; border-radius: 999px; background: var(--humo); overflow: hidden; margin: 4px 0 10px; }
.avance div { height: 100%; background: var(--verde); border-radius: 999px; }
.dato.fuerte span { font-weight: 700; color: var(--azul); font-size: 17px; }
.historial li b small { display: block; font-weight: 400; font-size: 13px; color: var(--texto-2); overflow-wrap: anywhere; }
.historial li .enlace { flex: 0 0 auto; font-size: 14px; }

/* ---------- Pantalla Cobros y avisos de saldo ---------- */
.numero-grande { font-family: var(--titulos, inherit); font-size: 34px; font-weight: 800; color: var(--azul); line-height: 1.1; overflow-wrap: anywhere; }
.numero-medio { font-size: 20px; font-weight: 800; color: var(--azul); white-space: nowrap; }
.chip.debe { background: #FDECEA; color: #B42318; font-style: normal; }

/* Caja del logo ancho para el PDF */
.logo-caja.ancha { width: 150px; background: #fff; }

/* ---------- Seguimiento ---------- */
.chip.vencido { background: #FFF4D6; color: #8A5A00; font-style: normal; }
.seguir .chips { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.seguir .chips .chip { font-style: normal; }
.seguir .acciones { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.seguir .acciones .boton { margin: 0; width: auto; display: flex; align-items: center; justify-content: center; text-align: center; }
.una-linea { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Inicio: "Lo de hoy" ---------- */
.hoy .lista.dentro-tarjeta { margin: 4px 0 0; }
.hoy .boton { margin-top: 10px; }

/* ---------- Gastos ---------- */
.mes-fila { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mes-fila h2 { flex: 1 1 auto; margin: 0; text-align: center; min-width: 0; }
.mes-fila .boton.chico { flex: 0 0 auto; margin: 0; padding: 8px 14px; font-size: 20px; line-height: 1; }
.boton.apagado { opacity: .35; pointer-events: none; }
button.item { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; text-align: left; cursor: pointer; color: inherit; }

/* ---------- Mi mes ---------- */
.numero-grande.en-rojo { color: #B42318; }

/* ---------- Equipo e invitaciones ---------- */
.lista .item.apagada { opacity: .55; }
.lista .item .chip { flex: 0 0 auto; }
.invitacion + .invitacion { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--linea); }
.invitacion .acciones { margin: 0; }
.invitacion .acciones .boton { flex: 1 1 40%; margin: 0; }

/* ---------- Visitas ---------- */
.subtitulo { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--texto-2); margin: 18px 6px 8px; }
.hoja textarea { width: 100%; }

/* ---------- Agenda ---------- */
.subtitulo.hoy { color: var(--verde-osc); }
.tarjeta.dia { padding-top: 4px; padding-bottom: 4px; }
.historial li a.enlace { flex: 0 0 auto; font-size: 14px; }

/* Cálculos eléctricos */
.pestanas a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabla-ancha { overflow-x: auto; margin: 0 -4px; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tabla th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--texto-2); padding: 6px 4px; border-bottom: 1.5px solid var(--linea); }
.tabla td { padding: 8px 4px; border-top: 1px solid var(--linea); color: var(--texto); vertical-align: top; }
.tabla td small { color: var(--texto-2); font-size: 12.5px; }
.tabla th:not(:first-child), .tabla td:not(:first-child) { text-align: right; }
.fila-artefacto { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--linea); font-size: 15px; }
.fila-artefacto:first-of-type { border-top: 0; }
.fila-artefacto span { min-width: 0; }
.fila-artefacto small { color: var(--texto-2); white-space: nowrap; }
.fila-artefacto input { flex: 0 0 68px; width: 68px; height: 42px; border: 1.5px solid var(--linea); border-radius: 10px; text-align: center; font: inherit; }

/* v0.25: tres pestañas, recargos */
.pestanas.tres a { font-size: 14px; padding: 9px 4px; }
.recargos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.filtro.activo .x { margin-left: 6px; opacity: .7; }
.linea-mio .mio { display: block; font-size: 12.5px; font-weight: 600; color: var(--texto-2); margin-top: 6px; max-width: 180px; }
.linea-mio .mio input { margin-top: 3px; }
.chip.estado.e-intermedio { background: #FFF4D6; color: #7A5A00; }
#tarjetaMalas .dato { align-items: center; gap: 10px; }
.detalle-veh { margin: 8px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--texto-2); }
.detalle-veh b { color: var(--texto); }
#histVeh .item b .chip { font-size: 11px; margin-left: 4px; vertical-align: middle; }
.plan-cuotas { border-top: 1px solid var(--linea); padding-top: 12px; margin-top: 12px; }
.barra-cuotas { height: 8px; background: #E4E9F0; border-radius: 4px; overflow: hidden; margin: 8px 0 4px; }
.barra-cuotas > div { height: 100%; background: var(--verde-osc); }
.cuota { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--linea); font-size: 14px; }
.cuota.pagada .cuota-txt { color: var(--texto-2); text-decoration: line-through; }
.cuota-txt { min-width: 0; }
.cuota-acc { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.cuota-acc .boton { width: auto; margin: 0; padding: 6px 10px; }
.cuota-acc .enlace { text-decoration: none; font-size: 18px; }
.bloque-cuotas { border: 1.5px dashed var(--linea); border-radius: 12px; padding: 12px 12px 0; margin: 4px 0 12px; }
small.rojo { color: var(--rojo) !important; font-weight: 600; }
/* Proyectos (v0.30) */
.tres { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.herramientas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.herr { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; border: 1.5px solid var(--linea); border-radius: 10px; background: #fff; font-size: 11.5px; font-weight: 600; color: var(--texto-2); font-family: inherit; }
.herr span { font-size: 19px; line-height: 1; }
.herr.activa { border-color: var(--principal, #092744); background: #EEF3F9; color: var(--texto); }
.lienzo { background: #fff; border-radius: 10px; touch-action: manipulation; }
.lienzo svg { display: block; width: 100%; max-height: 62vh; }
.pa-piso { fill: #F6F8FB; }
.pa-pared { fill: none; stroke: #092744; stroke-width: 0.1; }
.pa-cota { fill: #5B6B80; font-family: inherit; }
.pa-cano { stroke: #7A8BA0; stroke-width: 0.05; stroke-dasharray: 0.16 0.1; }
.pa-cano-iug { stroke: #C99A00; }
.pa-cano-tug { stroke: #2F7DBF; }
.pa-cano-tue { stroke: #B5481F; }
.pa-comb { stroke: #7B4FA0; stroke-width: 0.035; stroke-dasharray: 0.06 0.08; }
.pa-cables { cursor: pointer; }
.pa-cables circle { fill: #fff; stroke: #7A8BA0; stroke-width: 0.03; }
.pa-cables-iug circle { stroke: #C99A00; }
.pa-cables-tug circle { stroke: #2F7DBF; }
.pa-cables-tue circle { stroke: #B5481F; }
.pa-cables text { fill: var(--texto, #10233D); font-weight: 700; font-family: inherit; }
.punto-red { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.pr-iug { background: #C99A00; } .pr-tug { background: #2F7DBF; } .pr-tue { background: #B5481F; }
.marcas .tilde { padding: 6px 0; }
.marcas small { font-size: 12px; }
.pa-puerta { stroke: #C79A00; stroke-width: 0.2; stroke-linecap: butt; }
.pa-ventana { stroke: #5AA9E6; stroke-width: 0.2; stroke-linecap: butt; }
.pa-entrada-sup { fill: none; stroke: #3BA55D; stroke-width: 0.06; stroke-dasharray: 0.08 0.06; }
.estado-guardado.mal, #estadoGuardado.mal { color: var(--rojo); }
b.rojo { color: var(--rojo); }
/* Proyectos v0.31: símbolos IRAM, leyenda y circuitos */
.pa-sim { fill: #fff; stroke: #092744; stroke-width: 0.045; }
.pa-luz circle { fill: #FFF8DC; }
#circuitosProy .aviso { margin: 8px 0 10px; }
.pa-sim .lleno, .pa-especial path.lleno { fill: #092744; }
.pa-entrada { stroke: #2E8B57; } .pa-entrada .lleno { fill: #2E8B57; } .pa-entrada rect { fill: #2E8B57; }
.pa-circ { fill: #B5481F; font-weight: 700; font-family: inherit; }
.leyenda { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: 12px; color: var(--texto-2); }
.ley { display: inline-flex; align-items: center; gap: 4px; }
.ley svg { width: 26px; height: 24px; flex: 0 0 26px; }
.circ { border-top: 1px solid var(--linea); padding: 10px 0; }
.circ:first-of-type { border-top: 0; }
.circ-det { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; }
/* Plano de la casa (v0.35) */
.lienzo-casa svg { touch-action: none; max-height: 60vh; }
.pc-fondo { fill: #fff; }
.pc-rect { fill: #F6F8FB; stroke: #092744; stroke-width: 0.1; }
.pc-amb.elegido .pc-rect { fill: #E3EEF9; stroke: #2F7D6D; stroke-width: 0.14; }
.pc-nombre { fill: #092744; font-weight: 700; font-family: inherit; pointer-events: none; }
.pc-medida { fill: #5B6B80; font-family: inherit; pointer-events: none; }
.pc-pilar rect { fill: #B5481F; } .pc-pilar text { fill: #fff; font-weight: 700; font-family: inherit; }
.pc-linea { fill: none; stroke: #B5481F; stroke-width: 0.07; stroke-dasharray: 0.25 0.15; }
.pc-tierra-linea { fill: none; stroke: #2E8B57; stroke-width: 0.07; stroke-dasharray: 0.25 0.15; }
.pc-jabalina { cursor: grab; }
.pc-jabalina rect { fill: #E8F5EC; stroke: #2E8B57; stroke-width: 0.05; }
.pc-jabalina line { stroke: #2E8B57; stroke-width: 0.05; }
.flechas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.flechas .boton { margin: 0; font-size: 18px; }

/* Volver a llamar (v0.48) */
.volver-item { padding: 12px 0; }
.volver-item + .volver-item { border-top: 1px solid var(--linea); }

/* ---------- v0.49: base visual (íconos de línea, título de pantalla, menú con + al medio) ---------- */
.ico { width: 22px; height: 22px; display: block; }
.barra { padding: calc(12px + env(safe-area-inset-top)) 16px 12px; gap: 12px; }
.barra img { width: 36px; height: 36px; }
.barra .titulo { font-family: Montserrat, system-ui, sans-serif; font-weight: 700; font-size: 19px; line-height: 1.2; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra .negocio { font-family: Inter, system-ui, sans-serif; font-weight: 400; font-size: 13px; }
.menu-abajo { align-items: stretch; }
.menu-abajo a { min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 600; padding: 9px 2px 9px; }
.menu-abajo a .icono { font-size: 0; line-height: 0; }
.menu-abajo a.centro { border-top-color: transparent; }
.menu-abajo a.centro .icono {
  width: 52px; height: 48px; border-radius: 15px; background: var(--verde); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(40,124,128,0.3);
}
.menu-abajo a.centro .ico { width: 28px; height: 28px; stroke-width: 2.2; }
.menu-abajo a.centro:active .icono { background: var(--verde-osc); }
.lista.con-icono .icono {
  width: 38px; height: 38px; border-radius: 11px; background: var(--humo); color: var(--azul);
  display: flex; align-items: center; justify-content: center; font-size: 0;
}
.lista.con-icono .icono .ico { width: 21px; height: 21px; }

/* ---------- v0.50: Inicio nuevo y hoja del + ---------- */
.saludo { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 16px 2px 0; flex-wrap: wrap; }
.saludo h2 { font-size: 19px; color: var(--azul); }
.saludo span { font-size: 14px; color: var(--texto-2); }
.resumen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.resumen a { background: #fff; border-radius: 14px; padding: 11px 10px; text-decoration: none; color: var(--texto); box-shadow: 0 1px 2px rgba(6,34,63,0.06); min-width: 0; }
.resumen small { display: block; font-size: 12px; color: var(--texto-2); line-height: 1.25; }
.resumen b { display: block; font-size: 15.5px; color: var(--azul); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resumen b.rojo { color: var(--rojo); }
@media (max-width: 350px) { .resumen b { font-size: 13.5px; } .resumen a { padding: 10px 8px; } }
.resumen + .tarjeta { margin-top: 12px; }
.titulo-fila .enlace { font-size: 14px; font-weight: 600; color: var(--verde-osc); text-decoration: none; }
.agenda-item .hora { flex: 0 0 auto; width: 54px; font-weight: 700; font-size: 14px; color: var(--azul); line-height: 1.2; }
.tareas .tarea { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--linea); }
.tareas > .tarea:first-child { border-top: 0; }
.tareas .tarea .txt { flex: 1 1 auto; min-width: 0; text-decoration: none; color: var(--texto); }
.tareas .tarea b { display: block; color: var(--azul); font-size: 15.5px; overflow-wrap: anywhere; }
.tareas .tarea small { display: block; color: var(--texto-2); font-size: 13.5px; overflow-wrap: anywhere; }
.tareas .tarea small.rojo { color: var(--rojo); }
.tareas .tarea .boton.chico { flex: 0 0 auto; margin: 0; padding: 9px 14px; font-size: 14px; min-width: 76px; text-align: center; }
.grilla-cargar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.opcion-cargar { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px; border-radius: 14px; background: var(--humo); color: var(--azul); text-decoration: none; font-weight: 600; font-size: 14px; text-align: center; }
.opcion-cargar:first-child { background: var(--ok-fondo); color: var(--verde-osc); }
.opcion-cargar .ico { width: 26px; height: 26px; }
.cerrar-hoja { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--humo); color: var(--texto); font-size: 16px; cursor: pointer; flex: 0 0 auto; }

/* ---------- v0.51: detalle del presupuesto ---------- */
.boton-icono { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--humo); color: var(--azul); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; cursor: pointer; text-decoration: none; font-weight: 700; }
.cabecera-trabajo .titulo-fila { margin-bottom: 4px; }
.cabecera-trabajo .titulo-fila h2 { flex: 1 1 auto; min-width: 0; }
.menu-acciones { border: 1px solid var(--linea); border-radius: 12px; margin: 6px 0 8px; padding: 0 12px; }
.menu-acciones .item { display: block; width: 100%; padding: 13px 2px; border: 0; border-top: 1px solid var(--linea); background: none; text-align: left; font: inherit; font-weight: 600; color: var(--azul); text-decoration: none; cursor: pointer; }
.menu-acciones .item:first-child { border-top: 0; }
.menu-acciones .item.peligro { color: var(--rojo); }
.cliente-fila { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--linea); }
.cliente-fila .txt { flex: 1 1 auto; min-width: 0; text-decoration: none; color: var(--texto); }
.cliente-fila b { display: block; color: var(--azul); font-size: 16px; overflow-wrap: anywhere; }
.cliente-fila small { display: block; color: var(--texto-2); font-size: 13.5px; }
.pasos { display: flex; gap: 6px; }
.paso { flex: 1 1 0; min-width: 0; }
.paso i { display: block; height: 6px; border-radius: 3px; background: var(--linea); }
.paso.hecho i { background: var(--verde); }
.paso span { display: block; font-size: 12px; color: var(--texto-2); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paso.actual span { color: var(--azul); font-weight: 700; }
.rojo-suave { color: var(--rojo) !important; }
.estados.compactos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.estados.compactos .filtro { flex: 0 0 auto; width: auto; padding: 8px 12px; font-size: 13.5px; }
.estados.compactos .filtro.siguiente { background: var(--verde); border-color: var(--verde); color: #fff; }
.plata-trabajo .total-fila { display: flex; justify-content: space-between; align-items: baseline; }
.plata-trabajo .total-fila span { color: var(--texto-2); font-size: 14px; }
.plata-trabajo .total-fila b { font-family: Montserrat, system-ui, sans-serif; font-size: 26px; font-weight: 800; color: var(--azul); }
.plata-trabajo .avance { margin: 10px 0 8px; }
.cobro-fila { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.cobro-fila .rojo { color: var(--rojo); } .cobro-fila .ok { color: var(--verde-osc); font-weight: 600; }
.pestanas-trabajo button { flex: 1 1 0; min-width: 0; border: 0; background: none; font: inherit; color: var(--texto-2); font-weight: 600; font-size: 14px; padding: 9px 2px; border-radius: 9px; cursor: pointer; }
.pestanas-trabajo button.activa { background: #fff; color: var(--azul); box-shadow: 0 1px 2px rgba(6,34,63,0.12); }
.pestanas-trabajo + .panel > .tarjeta:first-child, .panel > .tarjeta:first-child, .panel > div:first-child > .tarjeta:first-child { margin-top: 14px; }
.cuerpo.con-acciones-fijas { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.acciones-fijas { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 5; background: #fff; border-top: 1px solid var(--linea); padding: 10px 16px; box-shadow: 0 -4px 12px rgba(6,34,63,0.06); }
.acciones-fijas .dos-botones { max-width: 528px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.acciones-fijas .boton { margin: 0; }
.acciones-fijas .aviso { max-width: 528px; margin: 0 auto 8px; }
.estados.compactos .filtro.activo { display: none; }
.estados.compactos .filtro.siguiente { flex: 1 1 100%; order: -1; padding: 12px; font-size: 15px; }

/* ---------- v0.52: formularios sin menú, filtros en una fila ---------- */
body.dentro.sin-menu { padding-bottom: env(safe-area-inset-bottom); }
body.sin-menu .menu-abajo { display: none; }
body.sin-menu .guardar-fijo { bottom: env(safe-area-inset-bottom); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
#filtros { flex-wrap: nowrap; overflow-x: auto; margin-left: -18px; margin-right: -18px; padding: 0 18px 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#filtros::-webkit-scrollbar { display: none; }
#filtros .filtro { flex: 0 0 auto; white-space: nowrap; }
#atajosCargar .titulo-grupo { margin: 18px 0 4px; }

/* ---------- v0.53: versión para PC (pantallas de 1000 px o más). En el celular no cambia nada. ---------- */
.lateral { display: none; }
@media (min-width: 1000px) {
  body.dentro, body.dentro.sin-menu { padding-left: 248px; padding-bottom: 0; }
  .menu-abajo { display: none; }
  .lateral {
    display: flex; flex-direction: column; gap: 4px; position: fixed; left: 0; top: 0; bottom: 0; width: 248px; z-index: 7;
    background: var(--azul); color: #fff; overflow-y: auto; padding: 16px 12px 20px;
  }
  .lateral-marca { display: flex; align-items: center; gap: 10px; padding: 2px 6px 14px; }
  .lateral-marca img { width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto; }
  .lateral-marca img.logo-negocio { background: #fff; object-fit: contain; padding: 2px; }
  .lateral-marca b { display: block; font-family: Montserrat, system-ui, sans-serif; font-size: 14.5px; line-height: 1.25; overflow-wrap: anywhere; }
  .lateral-marca small { display: block; font-size: 12.5px; color: var(--gris); }
  .lateral-cargar {
    display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 4px 12px; padding: 11px 12px; border-radius: 12px;
    background: var(--verde); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px;
  }
  .lateral-cargar:hover { background: var(--verde-osc); }
  .lateral-cargar .ico { width: 20px; height: 20px; stroke-width: 2.2; }
  .lateral-menu { display: flex; flex-direction: column; gap: 2px; }
  .lateral-menu a { display: flex; align-items: center; gap: 12px; padding: 7px 12px; border-radius: 10px; color: #C9D4E0; text-decoration: none; font-size: 14.5px; font-weight: 600; }
  .lateral-menu a:hover { background: rgba(255,255,255,0.07); color: #fff; }
  .lateral-menu a.activo { background: rgba(63,184,180,0.18); color: #fff; }
  .lateral-menu .ico { width: 20px; height: 20px; flex: 0 0 auto; }
  .lateral-separador { height: 1px; background: rgba(255,255,255,0.12); margin: 8px 6px; }
  .barra img { display: none; }
  .barra { padding: 14px 32px; }
  .barra .negocio { display: none; }
  .barra .titulo { font-size: 21px; }
  .cuerpo { max-width: 820px; padding: 8px 32px 48px; }
  .cuerpo.con-acciones-fijas { padding-bottom: 110px; }
  .acciones-fijas { left: 248px; bottom: 0; padding-bottom: 14px; }
  .acciones-fijas .dos-botones, .acciones-fijas .aviso { max-width: 756px; }
  .guardar-fijo, body.sin-menu .guardar-fijo { bottom: 0; }
  .capa { align-items: center; }
  .hoja { border-radius: 20px; max-height: 86vh; padding-bottom: 20px; }
  /* Inicio en dos columnas: Hoy a la izquierda, Para hacer a la derecha */
  #loDeHoy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-top: 12px; }
  #loDeHoy > * { margin-top: 0 !important; }
  #loDeHoy > #hoyResumen, #loDeHoy > #hoyVolver, #loDeHoy > #hoyAlDia, #loDeHoy > section:only-child,
  #loDeHoy > #hoyResumen + #hoyParaHacer, #loDeHoy > #hoyAgenda:not(:has(+ #hoyParaHacer)) { grid-column: 1 / -1; }
  #loDeHoy > #hoyVolver:empty { display: none; }
  .resumen b { font-size: 19px; }
  .resumen a { padding: 14px 16px; }
}

/* ---------- v0.54: Turnos del taller ---------- */
.tira-dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.dia-tira { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px; border: 1.5px solid var(--linea); border-radius: 12px; background: #fff; color: var(--texto); text-decoration: none; min-width: 0; }
.dia-tira small { font-size: 11.5px; color: var(--texto-2); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dia-tira b { font-size: 19px; line-height: 1.2; color: var(--azul); }
.dia-tira.hoy { border-color: var(--verde-claro); }
.dia-tira.cerrado { background: var(--humo); }
.dia-tira.cerrado b, .dia-tira.cerrado small { color: var(--gris); }
.dia-tira.lleno small:last-child { color: var(--rojo); font-weight: 700; }
.dia-tira.sel { background: var(--azul); border-color: var(--azul); }
.dia-tira.sel b, .dia-tira.sel small { color: #fff; }
@media (max-width: 350px) { .tira-dias { gap: 3px; } .dia-tira { padding: 6px 0; border-radius: 10px; } .dia-tira small { font-size: 10.5px; } .dia-tira b { font-size: 17px; } }
.sub-dia { margin: -4px 6px 10px; }
.tarjeta.turno { border-left: 5px solid var(--ambar); }
.tarjeta.turno.cerrado { border-left-color: var(--gris); opacity: .8; }
.tarjeta.turno:has(.e-aprobado) { border-left-color: var(--verde); }
.turno-arriba { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.turno-arriba .chip { margin-left: auto; }
.turno-hora { font-weight: 700; font-size: 19px; color: var(--azul); min-width: 52px; }
.patente { display: inline-block; font-family: "Courier New", ui-monospace, monospace; font-weight: 700; font-size: 14px; letter-spacing: 1px; color: var(--azul); background: #fff; border: 1.5px solid var(--azul); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.turno-txt { margin-top: 6px; }
.turno-txt b { display: block; color: var(--azul); font-size: 16px; overflow-wrap: anywhere; }
.turno-txt small { display: block; color: var(--texto-2); font-size: 14px; overflow-wrap: anywhere; }
.turno-txt .turno-notas { font-style: italic; }
.turno-acciones { margin: 12px 0 0; flex-wrap: nowrap; }
.turno-acciones .boton.chico { display: flex; align-items: center; justify-content: center; margin: 0; line-height: 1.3; flex: 1 1 0; min-width: 0; padding: 9px 8px; font-size: 14.5px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .turno-acciones .largo { display: none; } }
.turno-acciones .boton.chico.turno-mas { flex: 0 0 48px; min-width: 48px; padding: 9px 0; font-weight: 700; }
.campo input.patente-campo { text-transform: uppercase; font-family: "Courier New", ui-monospace, monospace; font-weight: 700; letter-spacing: 2px; font-size: 19px; }
h2.rojo { color: var(--rojo); }
#turnosSinCerrar .tarea .boton.chico { min-width: 0; padding: 8px 12px; }
.boton.suave.peligro { color: var(--rojo); border-color: var(--rojo); }

/* ---------- v0.55: garantía y entrega (taller) ---------- */
.dato span.rojo { color: var(--rojo) !important; }
#tarjetaGarantia .titulo-fila { margin-bottom: 6px; }
#hayGarantia, #tuGarantia { margin-top: 8px; }

/* ---------- v0.56: service y recordatorios (taller) ---------- */
.tarjeta.service { border-left: 5px solid var(--linea); }
.tarjeta.service.pronto { border-left-color: var(--ambar); }
.tarjeta.service.vencido { border-left-color: var(--rojo); }
.tarjeta.service .turno-arriba b { color: var(--azul); font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.turno-txt b.en-linea { display: inline; font-size: inherit; }
.turno-txt small.ok-texto { color: var(--verde-osc); font-weight: 600; }
.tarjeta.service .enlace { padding: 10px 0 0; font-size: 14px; }
.tildes-svc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; margin-bottom: 10px; }
.tildes-svc .tilde { margin: 4px 0; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 350px) { .tildes-svc { grid-template-columns: 1fr; } }
#tabsService { margin: 14px 0 12px; }

/* ---------- v0.57: tarjeta de service ---------- */
.tarjeta-img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--linea); background: #fff; }

/* ---------- v0.58: reparto según el trabajo (taller) ---------- */
.l-hizo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 2px; font-size: 13.5px; color: var(--texto-2); }
.chip-hizo { font: inherit; font-size: 13.5px; font-weight: 600; color: var(--texto-2); background: #fff; border: 1.5px solid var(--linea); border-radius: 999px; padding: 5px 11px; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-hizo.activo { background: var(--verde); border-color: var(--verde); color: #fff; }
.renglon .hizo { display: block; color: var(--texto-2); font-size: 13px; }
.dato .sub-dato { display: block; font-size: 12.5px; color: var(--texto-2); font-weight: 400; }

/* ---------- v0.59 Carpintería: muebles ---------- */
.visor-3d { background: linear-gradient(#F7F8FA, #EEF1F5); border-radius: 12px; overflow: hidden; }
.visor-3d canvas { display: block; width: 100%; height: 260px; touch-action: pan-y; cursor: grab; }
.colores-mueble { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.color-mueble { font: inherit; background: #fff; border: 1.5px solid var(--linea); border-radius: 12px; padding: 7px 4px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.color-mueble i { display: block; width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.15); }
.color-mueble small { font-size: 11.5px; color: var(--texto-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.color-mueble.activo { border-color: var(--verde); box-shadow: 0 0 0 2px rgba(40,124,128,0.25); }
.color-mueble.activo small { color: var(--azul); font-weight: 600; }
.tabla-despiece { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabla-despiece th { text-align: left; font-size: 12px; color: var(--texto-2); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--linea); }
.tabla-despiece td { padding: 7px 4px; border-bottom: 1px solid var(--linea); vertical-align: top; }
.tabla-despiece td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.placa-svg svg { max-height: none; }
#listaMatMueble button.item { color: inherit; }
.tabla-despiece th:nth-child(2), .tabla-despiece td:nth-child(2) { text-align: left; }

/* ---------- v0.60 Carpintería: muebles en línea ---------- */
.mod-fila { display: flex; align-items: stretch; gap: 6px; border-bottom: 1px solid var(--linea); }
.mod-fila:last-child { border-bottom: 0; }
.mod-abrir { flex: 1; min-width: 0; text-align: left; background: none; border: 0; font: inherit; color: inherit; padding: 10px 0; cursor: pointer; }
.mod-abrir b { display: block; font-size: 15px; }
.mod-abrir small { display: block; color: var(--texto-2); font-size: 12.5px; margin-top: 2px; }
.mod-flechas { display: flex; align-items: center; gap: 4px; }
.mod-flechas button { width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--linea); background: #fff; font-size: 20px; line-height: 1; color: var(--azul); cursor: pointer; }
.mod-flechas button:disabled { opacity: 0.35; cursor: default; }
.ocupa { margin: 10px 0 0; font-size: 14px; color: var(--texto-2); }
.ocupa.bien { color: var(--verde); font-weight: 600; }
.ocupa.mal { color: #B42318; font-weight: 600; }
.tabla-despiece .donde { display: block; font-size: 11.5px; color: var(--texto-2); }

/* v0.61: km automáticos (botón "Calcular los km" con su ícono en la misma línea) */
.km-auto .enlace { display: inline-flex; align-items: center; gap: 6px; }
.km-auto .enlace .ico { width: 18px; height: 18px; flex: none; }
.km-auto .enlace:disabled { opacity: .55; }
#probarSalida { display: inline-flex; align-items: center; gap: 6px; }
#probarSalida .ico { width: 18px; height: 18px; flex: none; }

/* v0.68: suscripción (cartel, planes) y Administración */
.cartel-plan { margin: 0 0 14px; }
.cartel-plan .enlace { display: inline; padding: 0 0 0 4px; font-weight: 700; text-decoration: underline; }
.planes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 0 0 12px; }
.plan { border: 1.5px solid var(--borde, #d8dee6); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.plan b { color: var(--azul); }
.plan .precio { font-size: 20px; font-weight: 800; color: var(--verde-osc); }
.plan small { color: var(--texto-2); font-size: 12.5px; }
.numeros-admin { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; text-align: center; }
.numeros-admin b { display: block; font-size: 22px; color: var(--azul); }
.numeros-admin small { color: var(--texto-2); font-size: 12px; }
.chip-ok { background: var(--ok-fondo); color: var(--verde-osc); }
.chip-ojo { background: var(--ambar-fondo); color: var(--ambar); }
.chip-mal { background: var(--rojo-fondo); color: var(--rojo); }
.cuenta-admin .titulo-fila { align-items: flex-start; }
.notas-admin { white-space: pre-wrap; font-family: inherit; font-size: 13px; color: var(--texto-2); margin: 6px 0 0; }
.cuenta-admin .titulo-fila { flex-wrap: wrap; row-gap: 6px; }
.cuenta-admin h3 { font-size: 16px; }

/* ---------- v0.70 / v0.71: taller simple ---------- */
.resumen.dos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
details.mas-datos { margin: 4px 0 14px; border: 1px solid var(--linea); border-radius: 12px; padding: 0 12px; background: #fff; }
details.mas-datos > summary { cursor: pointer; list-style: none; padding: 12px 0; font-weight: 600; color: var(--azul); font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
details.mas-datos > summary::-webkit-details-marker { display: none; }
details.mas-datos > summary::after { content: "›"; font-size: 20px; line-height: 1; transform: rotate(90deg); transition: transform .15s; color: var(--texto-2); }
details.mas-datos[open] > summary::after { transform: rotate(-90deg); }
details.mas-datos[open] { padding-bottom: 4px; }
details.mas-datos .estados { margin-bottom: 10px; }
h3.dia-semana { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-2); margin: 14px 0 2px; }
h3.dia-semana:first-of-type { margin-top: 4px; }
h3.dia-semana.hoy { color: var(--azul); }
#hoySemana > .boton { margin-top: 12px; }
.tareas .tarea .boton.chico + .boton.chico { margin-left: -4px; }
