/* Vista móvil para técnicos y administradores, buscadores, adjuntos, logos de cliente y proyectos. */
/* ===== v3 · Vista móvil (clase .movil en <html>, solo técnicos y administradores) ===== */
.only-movil {
  display: none;
}
html.movil .only-movil {
  display: revert;
}
html.movil body {
  font-size: 16px;
  line-height: 1.5;
}
html.movil input,
html.movil select,
html.movil textarea {
  font-size: 16px;
  padding: 10px 12px;
  min-height: 44px;
}
html.movil input[type='checkbox'] {
  min-height: 0;
  width: 22px;
  height: 22px;
}
html.movil textarea {
  min-height: 110px;
}
html.movil .btn {
  font-size: 15px;
  padding: 10px 15px;
  min-height: 44px;
  justify-content: center;
}
html.movil .btn.sm {
  font-size: 14px;
  padding: 7px 12px;
  min-height: 38px;
}
html.movil .chip {
  font-size: 13px;
  padding: 3px 10px;
}
html.movil .brand b {
  font-size: 17px;
  white-space: nowrap;
}
html.movil .brand span,
html.movil .userbox .nm,
html.movil .hide-sm {
  display: none;
}
html.movil .top-row {
  gap: 8px;
  padding-block: 8px;
  flex-wrap: nowrap;
}
html.movil .timer .what {
  display: none;
}
html.movil .timer .clock {
  font-size: 14px;
}
html.movil .fgrid,
html.movil .fgrid.c3,
html.movil .fgrid.c4 {
  grid-template-columns: minmax(0, 1fr);
}
html.movil .contact-row {
  grid-template-columns: 1fr 1fr;
}
html.movil .cols-2 {
  grid-template-columns: minmax(0, 1fr);
}
html.movil .kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html.movil .kpi {
  padding: 12px 14px;
}
html.movil .kpi .val {
  font-size: 24px;
}
html.movil .modal {
  padding: 0;
}
html.movil .modal-card,
html.movil .modal-card.wide {
  border-radius: 0;
  min-height: 100%;
  margin: 0;
  max-width: none;
}
html.movil .m-head h2 {
  font-size: 18px;
}
html.movil .m-foot {
  border-radius: 0;
  position: sticky;
  bottom: 0;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}
html.movil .m-foot .left {
  width: 100%;
  margin-right: 0;
}
html.movil .m-foot {
  flex-wrap: wrap;
}
html.movil .m-foot > .btn {
  flex: 1 1 auto;
}
html.movil .kv {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html.movil .page-head h1 {
  font-size: 22px;
}
html.movil main {
  padding-block: 16px calc(96px + env(safe-area-inset-bottom, 0px));
}
html.movil .tabs.abajo {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  gap: 0;
  overflow: visible;
}
html.movil .tabs.abajo .tab {
  flex: 1;
  text-align: center;
  border-bottom: 0;
  border-top: 3px solid transparent;
  padding: 10px 4px 12px;
  font-size: 14.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
html.movil .tabs.abajo .tab svg {
  width: 22px;
  height: 22px;
}
html.movil .tabs.abajo .tab[aria-current='page'] {
  border-top-color: var(--accent);
  color: var(--accent-strong);
}
html.movil .tabs.abajo .tab .cnt {
  position: absolute;
  margin: -4px 0 0 26px;
}
html.movil .top .wrap:has(.tabs.abajo) {
  padding: 0;
}
html.movil .toast {
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}
.m-new {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px !important;
}
.m-new b {
  font-size: 19px;
  line-height: 1;
  font-weight: 600;
}
.mlist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  min-width: 0;
  text-align: left;
}
.mcard:active {
  background: var(--surface-2);
}
.mcard.void {
  opacity: 0.6;
}
.mc-top {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.mc-top .r {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 13.5px;
  color: var(--muted);
}
.mc-t {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.mc-s {
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.mc-s.clamp2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.msec {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 20px 0 8px;
}
.msec h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 16.5px;
  margin: 0;
  margin-right: auto;
}
.mact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.mfilters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.mfilters .seg {
  display: flex;
}
.mfilters .seg button {
  flex: 1;
  padding: 9px 6px;
  font-size: 14.5px;
}
.mday {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
  margin: 14px 2px 2px;
  display: flex;
}
.mday span {
  margin-left: auto;
  font-family: var(--f-mono);
}
.mcontact {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.mcontact:first-child {
  border-top: 0;
}
.mcontact .n {
  margin-right: auto;
  min-width: 0;
}
.mcontact .n b {
  display: block;
  font-weight: 600;
}
.mcontact .n span {
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.mlinks {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mfoot-note {
  text-align: center;
  margin: 28px 0 0;
}

/* Barra inferior: se desplaza si hay más pestañas de las que caben */
html.movil .tabs.abajo {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
html.movil .tabs.abajo::-webkit-scrollbar {
  display: none;
}
html.movil .tabs.abajo .tab {
  flex: 1 0 auto;
  min-width: 78px;
  position: relative;
  font-size: 13px;
}
html.movil .tabs.abajo .tab .cnt {
  right: 14px;
  margin: 0;
  top: 4px;
}
/* Cuenta: círculo con las iniciales; el idioma, la contraseña y salir van dentro */
.umenu-wrap {
  position: relative;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2, var(--surface));
  color: var(--fg);
  font: 600 13px/1 inherit;
  font-family: inherit;
  cursor: pointer;
}
.umenu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  min-width: 230px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.umenu[hidden] {
  display: none;
}
.umenu .idiomas {
  align-self: flex-start;
}
.umenu .btn {
  justify-content: flex-start;
}
.umenu-nm {
  color: var(--fg);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* Mensajes sin leer sobre el círculo de la cuenta */
.av-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  pointer-events: none;
}

/* Iconos de línea (icoUI en utilidades.js) en botones, menús y textos, en lugar de emojis de colores.
   Toman el tamaño y el color del texto que acompañan. */
.ico-ui {
  display: inline-flex;
  vertical-align: -0.2em;
  margin-right: 0.4em;
  flex: 0 0 auto;
}
.ico-ui svg {
  width: 1.2em;
  height: 1.2em;
}
.umenu .btn:has(> .ico-ui) {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}
.umenu .btn .ico-ui {
  color: var(--muted, currentColor);
  margin-right: 0.5em;
}
.plazo .ico-ui,
.chip .ico-ui {
  margin-right: 0.25em;
}

/* Ticket en la visita (movil.js): prioridad con botones, fotos, «Más datos», pie de la ficha y horas. */
.seg-pri {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.seg-op {
  position: relative;
}
.seg-op input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.seg-op span {
  display: block;
  text-align: center;
  padding: 10px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 14px;
  background: var(--surface);
}
.seg-op input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}
.seg-op.warn input:checked + span {
  border-color: var(--warn);
  background: var(--warn-soft);
  color: var(--warn);
}
.seg-op.crit input:checked + span {
  border-color: var(--crit);
  background: var(--crit-soft);
  color: var(--crit);
}
.seg-op input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.visita-fotos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.visita-fotos .btn {
  justify-content: center;
}
.visita-fotos-lista:empty {
  display: none;
}
details.mas-datos {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
details.mas-datos > summary {
  cursor: pointer;
  font-weight: 600;
}
details.mas-datos[open] > summary {
  margin-bottom: 12px;
}
html.movil .fgrid.horas-visita {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html.movil .m-foot.pie-visita {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pie-visita > .btn,
.pie-visita .mas-acc > summary {
  width: 100%;
  justify-content: center;
}
.mas-acc {
  position: relative;
}
.mas-acc > summary {
  list-style: none;
}
.mas-acc > summary::-webkit-details-marker {
  display: none;
}
.mas-acc-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}
html.movil .mas-acc-menu .btn {
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  white-space: normal;
}
