/* Móvil (clase .movil en <html>): texto y controles más grandes; el escritorio no cambia. */
/* ===== Móvil: texto y controles más grandes (solo pantallas estrechas; el escritorio no cambia) ===== */
.hdr-top {
  flex-wrap: nowrap;
}
.brand {
  min-width: 0;
}
.brand > div {
  min-width: 0;
}
.brand b,
.brand small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.umenu {
  position: relative;
  flex: none;
}
.avatar {
  appearance: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent);
  font: 600 14px var(--f-body);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.avatar:hover,
.avatar[aria-expanded='true'] {
  border-color: var(--accent);
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 35;
  min-width: 240px;
  max-width: calc(100vw - 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(10, 16, 24, 0.18);
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.menu-who {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  min-width: 0;
}
.menu-who .sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-it {
  appearance: none;
  border: 0;
  background: none;
  text-align: left;
  font: 500 14px var(--f-body);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.menu-it:hover,
.menu-it:focus-visible {
  background: var(--surface-2);
}
.rango {
  gap: 8px;
}
.rango-f {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.rango-f .fld {
  flex: 0 1 180px;
}
/* ===== Móvil (clase .movil en <html>): texto y controles grandes; el escritorio no cambia ===== */
html.movil body {
  font-size: 16px;
  line-height: 1.5;
}
html.movil h1 {
  font-size: 25px;
}
html.movil h2 {
  font-size: 17px;
}
html.movil .sub,
html.movil .kv dt,
html.movil .fld,
html.movil .empty {
  font-size: 14.5px;
}
html.movil .ref {
  font-size: 13px;
}
html.movil .desc {
  font-size: 15.5px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
html.movil .big {
  font-size: 16.5px;
}
html.movil .pill {
  font-size: 13px;
  padding: 3px 10px;
}
html.movil input,
html.movil select,
html.movil textarea {
  font-size: 16px;
  padding: 11px 12px;
  min-height: 46px;
}
html.movil textarea {
  min-height: 120px;
}
html.movil input[type='checkbox'] {
  min-height: 0;
  width: 22px;
  height: 22px;
}
html.movil .chk {
  font-size: 15.5px;
}
html.movil .btn {
  font-size: 15.5px;
  padding: 11px 16px;
  min-height: 46px;
  justify-content: center;
}
html.movil .btn.sm {
  font-size: 14.5px;
  padding: 8px 13px;
  min-height: 40px;
}
html.movil .formbar .btn {
  flex: 1;
}
html.movil .chip {
  font-size: 14.5px;
  padding: 8px 14px;
}
html.movil .tab {
  font-size: 16px;
  padding: 13px 14px;
}
html.movil .back {
  font-size: 16px;
  padding: 6px 0;
}
html.movil .hdr-top {
  padding-block: 8px 2px;
}
html.movil .brand b {
  font-size: 18px;
}
html.movil .brand svg {
  width: 28px;
  height: 28px;
}
html.movil .item {
  padding: 14px 16px;
  gap: 6px;
}
html.movil .main b {
  font-size: 16.5px;
}
html.movil .when {
  font-size: 17px;
}
html.movil .kpi b {
  font-size: 30px;
}
html.movil .kv {
  grid-template-columns: minmax(0, 1fr);
}
html.movil .kv dd {
  margin-bottom: 8px;
  font-size: 16px;
}
html.movil .checks.col label {
  font-size: 16px;
}
html.movil .checks.col input {
  width: 24px;
  height: 24px;
}
html.movil .panel {
  width: 100%;
}
html.movil .ph h2 {
  font-size: 19px;
}
html.movil .x {
  width: 44px;
  height: 44px;
}
html.movil .toast {
  font-size: 15.5px;
}
html.movil .picker {
  max-height: none;
}
.otnum {
  display: block;
  font-family: var(--f-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
/* Operario con permiso: "Nueva orden" arriba a la derecha, junto al menú (en el móvil sustituye a los botones de cada pantalla) */
.hdr-acts {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.hdr-new {
  display: none;
}
html.movil .hdr-new {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 15px;
  border-radius: 999px;
}
.brand svg {
  flex: none;
}
html.movil .hdr-new b {
  font-size: 19px;
  line-height: 1;
}
html.movil .tec-nuevo {
  display: none;
}
html.movil .tabs.tec {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html.movil .tabs.tec .in {
  justify-content: space-around;
  padding-left: 0;
  padding-right: 0;
}
html.movil .tabs.tec .tab {
  flex: 1;
  text-align: center;
  border-bottom: 0;
  border-top: 3px solid transparent;
  padding: 12px 6px 14px;
  font-size: 15.5px;
}
html.movil .tabs.tec .tab[aria-current='page'] {
  border-top-color: var(--accent);
  border-bottom: 0;
}
html.movil body:has(.tabs.tec) main.in {
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}
html.movil body:has(.tabs.tec) .toast {
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}
html.movil .kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html.movil .avatar {
  width: 42px;
  height: 42px;
  font-size: 15.5px;
}
html.movil .menu-it {
  font-size: 16px;
  padding: 14px 12px;
}
html.movil .menu {
  min-width: 260px;
}
html.movil .rango-f .fld {
  flex: 1 1 140px;
}
/* Idioma: castellano / català (menú de usuario y pantalla de entrada) */
.menu-idioma {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
}
.idiomas {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
  background: var(--surface-2);
}
.idioma {
  appearance: none;
  border: 0;
  background: none;
  font: 500 13px var(--f-body);
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.idioma.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(10, 16, 24, 0.12);
}
.login .idiomas {
  align-self: center;
  margin-top: 4px;
}
