:root {
  --navy: #12205C;
  --blue: #1E2F86;
  --red: #E5231B;
  --cream: #F6F4EF;
  --charcoal: #1A1B1E;
  --steel: #5B6472;
  --line: #DDD9CE;
  --font-head: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;
  --sidebar-w: 240px;
  --panel-nav-h: 58px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
}
h1, h2, h3 { font-family: var(--font-head); margin: 0; color: var(--navy); }
a { color: var(--blue); }

/* ---- Login ---- */
.auth {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
  background-color: #eef1f7;
  background-image:
    radial-gradient(1200px 700px at 12% 8%, #ffffff 0%, transparent 60%),
    radial-gradient(1000px 800px at 88% 100%, #e4e9f5 0%, transparent 55%),
    linear-gradient(160deg, #f7f9fc 0%, #e9edf6 55%, #dfe4f1 100%);
}
/* faint dot grid for subtle depth */
.auth::before {
  content: "";
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background-image: radial-gradient(rgba(18,32,92,0.06) 1px, transparent 1.6px);
  background-size: 26px 26px;
  transform: rotate(-8deg);
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
}
/* soft 3D orbs floating behind the card */
.auth::after {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -120px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #2c3f9e, #172a6b 55%, #0f1d4d 100%);
  filter: blur(6px);
  opacity: 0.16;
  box-shadow: -180px 420px 60px -40px rgba(229,35,27,0.18);
}
.auth__card {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  width: 100%;
  max-width: 380px;
  padding: 2.6rem 2.2rem;
  border-radius: 16px;
  border: 1px solid rgba(18,32,92,0.06);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 2px 6px rgba(18,32,92,0.06),
    0 14px 30px rgba(18,32,92,0.10),
    0 40px 80px -20px rgba(18,32,92,0.18);
}
.auth__logo { height: 46px; margin: 0 auto 1.5rem; display: block; }
.auth__card h1 { font-size: 1.4rem; text-align: center; margin-bottom: 0.3rem; }
.auth__subtitle { text-align: center; color: var(--steel); font-size: 0.9rem; margin-bottom: 1.8rem; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-size: 0.85rem; color: var(--steel); margin-bottom: 0.4rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.7em 0.8em;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.btn-submit {
  width: 100%;
  padding: 0.8em;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: var(--font-head);
  font-size: 1rem;
  letter-spacing: 0.3px;
  cursor: pointer;
  margin-top: 0.4rem;
  box-shadow: 0 4px 0 #a01812, 0 8px 14px rgba(0,0,0,0.15);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #a01812, 0 10px 16px rgba(0,0,0,0.18); }
.btn-submit:active { transform: translateY(3px); box-shadow: 0 1px 0 #a01812, 0 2px 6px rgba(0,0,0,0.15); }
.auth__error {
  background: #fdecea;
  color: #a4231b;
  padding: 0.75em 1em;
  border-radius: 3px;
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
}
.auth__exito {
  background: #E9F4EC;
  color: #227A3D;
  padding: 0.75em 1em;
  border-radius: 3px;
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
}
.auth__back { display: block; text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: var(--steel); text-decoration: none; }
.auth__privacy { display: block; text-align: center; margin-top: 0.6rem; font-size: 0.75rem; color: var(--steel); text-decoration: none; opacity: 0.7; }
.auth__privacy:hover { text-decoration: underline; opacity: 1; }

/* ---- Panel interno (admin/cliente/personal) ---- */
.panel-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: var(--panel-nav-h);
  background: var(--navy);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.panel-nav__brand { display: flex; align-items: center; gap: 0.8rem; margin-right: auto; }
.panel-nav__brand img { height: 30px; }
.panel-nav__brand span { font-family: var(--font-head); color: #fff; font-size: 1rem; }
.panel-nav__right { display: flex; align-items: center; gap: 1.2rem; }
.panel-nav__user { color: #d7dbef; font-size: 0.88rem; }
.panel-nav__user--link { text-decoration: none; border-bottom: 1px dotted rgba(215,219,239,0.5); }
.panel-nav__user--link:hover { color: #fff; border-bottom-color: #fff; }
.panel-nav__logout {
  color: #fff;
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 0.88rem;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 0.4em 1em;
  border-radius: 4px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.3);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}
.panel-nav__logout:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); box-shadow: 0 4px 0 rgba(0,0,0,0.3); }
.panel-nav__logout:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,0.3); }

/* Botón hamburguesa: solo visible en móvil y solo donde hay menú lateral. */
.panel-nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
}
.panel-nav__toggle svg { width: 22px; height: 22px; display: block; }

/* ---- Menú lateral del panel (sidebar) ---- */
/* Mismo fondo que .panel-nav (var(--navy)); activo en var(--red). Sin colores nuevos. */
.sidenav {
  position: fixed;
  top: var(--panel-nav-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  z-index: 20;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 0.7rem;
  overflow-y: auto;
}
.sidenav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75em 0.9em;
  text-decoration: none;
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.sidenav a svg { width: 20px; height: 20px; flex: 0 0 auto; display: block; }
.sidenav a span { line-height: 1.15; }
.sidenav a:hover { background: rgba(255,255,255,0.10); }
.sidenav a.is-active { background: var(--red); }

/* Acordeón del sidebar: solo "Mantenimientos" despliega sub-opciones.
   "Mantenimientos" es un enlace (a su propia pantalla) + un botón con la flecha
   que abre/cierra las 3 sub-opciones. */
.sidenav__acc { display: flex; flex-direction: column; }
.sidenav__acc-head { display: flex; align-items: stretch; gap: 0.15rem; }
.sidenav__acc-head .sidenav__acc-link { flex: 1 1 auto; }
.sidenav__acc-caret {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.sidenav__acc-caret:hover { background: rgba(255,255,255,0.10); }
.sidenav__caret { width: 15px; height: 15px; display: block; transition: transform 0.18s ease; }
.sidenav__acc.is-open .sidenav__caret { transform: rotate(180deg); }
.sidenav__sub {
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0.2rem 0 0.15rem 1.35rem;
  padding-left: 0.5rem;
  border-left: 2px solid rgba(255,255,255,0.16);
}
.sidenav__acc.is-open .sidenav__sub { display: flex; }
.sidenav__sub a {
  padding: 0.55em 0.85em;
  font-size: 0.8rem;
  letter-spacing: 0.4px;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.5rem;
  padding-bottom: 0.4rem;
}
.subnav a {
  --btn-bg: var(--navy);
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.85em 1.7em;
  text-decoration: none;
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: var(--btn-bg);
  border: none;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(18,32,92,0.28), 0 2px 0 rgba(0,0,0,0.25);
  transform: perspective(1px) translateZ(0);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.subnav a::after {
  content: "";
  position: absolute;
  left: 1.7em;
  right: 1.7em;
  bottom: 0.55em;
  height: 3px;
  border-radius: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.subnav a:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 28px rgba(18,32,92,0.38), 0 3px 0 rgba(0,0,0,0.25);
  filter: brightness(1.12);
}
.subnav a:active { transform: translateY(-1px) scale(1.02); }
.subnav a.is-active {
  --btn-bg: linear-gradient(180deg, var(--red), #b81812);
  box-shadow: 0 10px 24px rgba(229,35,27,0.4), 0 3px 0 rgba(0,0,0,0.28);
}
.subnav a.is-active::after { transform: scaleX(1); }

.panel { max-width: 1000px; margin: var(--panel-nav-h) auto 0; padding: 3rem 1.5rem; }
body.has-sidebar .panel { margin-left: var(--sidebar-w); }
.panel__header { margin-bottom: 2rem; }
.panel__header h1 { font-size: 1.8rem; }
.panel__header p { color: var(--steel); margin-top: 0.4rem; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.8rem;
  margin-bottom: 2rem;
}
.card h2 { font-size: 1.15rem; margin-bottom: 1.3rem; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: end;
}
.form-grid .field { margin-bottom: 0; }
.form-grid .btn-submit { padding: 0.7em; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.7em 0.6em; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
th { color: var(--steel); font-weight: 500; font-family: var(--font-head); letter-spacing: 0.3px; }
.badge {
  display: inline-block;
  padding: 0.2em 0.7em;
  border-radius: 20px;
  font-size: 0.78rem;
  font-family: var(--font-head);
}
.badge--administrador { background: #FDEBEA; color: var(--red); }
.badge--personal { background: #E7EBF8; color: var(--blue); }
.badge--cliente { background: #E9F4EC; color: #227A3D; }
.badge--operador { background: #F3E3C1; color: #8A5A12; }
.badge--administrativo { background: var(--cream); color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }
/* Trabajo rápido ("Ajuste rápido"): registro de 1 paso que no toca el estatus. */
.badge--ajuste { background: #E4F1EE; color: #0C6B5E; }

/* Semáforo de vencimiento de seguros (pantalla Unidades). */
.badge--rojo { background: #FDEBEA; color: var(--red); }
.badge--amarillo { background: #FCF1D6; color: #8A6D12; }
.badge--verde { background: #E9F4EC; color: #227A3D; }
.fila-riesgo--rojo { background: #FDF4F3; }
.fila-riesgo--amarillo { background: #FEFAEE; }
.fila-riesgo--verde { background: #F4FAF6; }

/* Estatus de operador ("Baja"): gris neutro, distinto del resto. */
.badge--gris { background: #EEF0F2; color: var(--steel); }

.btn-danger {
  background: #fff;
  border: 1px solid #E5231B;
  color: #E5231B;
  padding: 0.35em 0.9em;
  border-radius: 4px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--font-body);
  box-shadow: 0 2px 0 #E5231B;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}
.btn-danger:hover { background: #FDEBEA; transform: translateY(-1px); box-shadow: 0 3px 0 #E5231B; }
.btn-danger:active { transform: translateY(2px); box-shadow: 0 0px 0 #E5231B; }

.btn-add-refaccion {
  background: #fff;
  border: 1px dashed var(--blue);
  color: var(--blue);
  padding: 0.5em 1em;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 0.3rem;
  box-shadow: 0 2px 0 rgba(30,47,134,0.3);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn-add-refaccion:hover { transform: translateY(-1px); box-shadow: 0 3px 0 rgba(30,47,134,0.3); }
.btn-add-refaccion:active { transform: translateY(2px); box-shadow: 0 0px 0 rgba(30,47,134,0.3); }

.notice { padding: 0.75em 1em; border-radius: 3px; font-size: 0.88rem; margin-bottom: 1.2rem; }
.notice--error { background: #fdecea; color: #a4231b; }
.notice--exito { background: #E9F4EC; color: #227A3D; }
.notice--advertencia { background: #FCF1D6; color: #8A6D12; }
.notice--advertencia ul { margin: 0.4em 0 0.6em 1.2em; padding: 0; }
.notice--advertencia label { display: flex; align-items: center; gap: 0.5em; font-weight: normal; margin-top: 0.5em; }

.empty-state { color: var(--steel); font-size: 0.95rem; padding: 2rem 0; text-align: center; }

.paginacion { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-top: 1.3rem; font-size: 0.88rem; }
.paginacion a, .paginacion button, .paginacion strong, .paginacion span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2rem; padding: 0.35em 0.6em; border-radius: 4px; text-decoration: none;
  font: inherit; line-height: 1;
}
.paginacion a, .paginacion button { border: 1px solid var(--line); color: var(--blue); background: #fff; cursor: pointer; }
.paginacion a:hover, .paginacion button:hover { background: #E7EBF8; }
.paginacion strong { border: 1px solid var(--blue); background: var(--blue); color: #fff; }
.paginacion .paginacion__hueco { border: none; color: var(--steel); min-width: 0; padding: 0.35em 0.2em; }
.paginacion .paginacion__off { border: 1px solid var(--line); color: var(--steel); opacity: 0.45; }

.refaccion-row { display: grid; grid-template-columns: 2fr 1.4fr 1fr auto; gap: 0.6rem; margin-bottom: 0.6rem; }
@media (max-width: 720px) { .refaccion-row { grid-template-columns: 1fr; } }
.refaccion-row button { background: none; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; color: var(--steel); }

.fluido-row { display: grid; grid-template-columns: 2fr 1fr auto; gap: 0.6rem; margin-bottom: 0.6rem; }
@media (max-width: 720px) { .fluido-row { grid-template-columns: 1fr; } }
.fluido-row select, .fluido-row input {
  width: 100%;
  padding: 0.7em 0.8em;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.fluido-row select:focus, .fluido-row input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.fluido-row button { background: none; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; color: var(--steel); padding: 0 0.9em; }
.mant-detalle { font-size: 0.85rem; color: var(--steel); margin: 0; }
.mant-refacciones { font-size: 0.85rem; margin-top: 0.3rem; }
.mant-refacciones span { display: inline-block; background: #F2F1EC; border-radius: 3px; padding: 0.15em 0.6em; margin: 0.15em 0.3em 0.15em 0; }

/* ---- Pestaña "General": fila que se expande con "Ver detalle" ---- */
.btn-ver-detalle {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--blue);
  padding: 0.35em 0.9em;
  border-radius: 4px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--font-body);
  box-shadow: 0 2px 0 rgba(30,47,134,0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}
.btn-ver-detalle:hover { background: #E7EBF8; transform: translateY(-1px); box-shadow: 0 3px 0 rgba(30,47,134,0.25); }
.btn-ver-detalle:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(30,47,134,0.25); }
.mant-detalle-fila[hidden] { display: none; }
.mant-detalle-fila > td { background: #FAF9F5; box-shadow: inset 0 2px 6px -4px rgba(0,0,0,0.2); }
.mant-detalle-panel { padding: 0.9rem 0.4rem; font-size: 0.88rem; }
.mant-detalle-panel p { margin: 0 0 0.5rem; }
.mant-detalle-panel .mant-detalle-acciones { margin-top: 0.8rem; display: flex; gap: 0.8rem; align-items: center; }

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ---- Menú lateral: responsive ---- */
/* En pantallas angostas (celular) el sidebar se vuelve un desplegable con ☰. */
/* Escritorio: ancho > 768px => sidebar vertical fija (reglas base de .sidenav).
   Móvil: <= 768px => menú desplegable con botón hamburguesa. */
@media (max-width: 768px) {
  body.has-sidebar .panel-nav__toggle { display: inline-flex; }

  /* Evita que la barra superior se desborde en pantallas de celular. */
  .panel-nav { gap: 0.5rem; }
  .panel-nav__brand { min-width: 0; }
  .panel-nav__brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
  .panel-nav__right { gap: 0.6rem; flex-shrink: 0; }
  .panel-nav__user { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
  .panel-nav__logout { white-space: nowrap; padding: 0.35em 0.75em; }

  .sidenav {
    right: 0;
    width: auto;
    bottom: auto;
    max-height: calc(100vh - var(--panel-nav-h));
    transform: translateY(-115%);
    transition: transform 0.22s ease;
    box-shadow: 0 14px 26px rgba(0,0,0,0.28);
    gap: 0.15rem;
  }
  body.sidebar-open .sidenav { transform: translateY(0); }

  body.has-sidebar .panel { margin-left: auto; }
}

/* ---- Modal "¿Quién eres?" (identidad por PIN antes de guardar una acción) ---- */
.idmodal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(6, 14, 46, 0.78);
}
/* `display: flex` de arriba gana sobre el `[hidden]` del navegador (mismo peso,
   author > UA): sin esto el modal se queda SIEMPRE visible y tapa la pantalla.
   Mismo arreglo que .mant-detalle-fila[hidden]. */
.idmodal[hidden] { display: none; }
.idmodal__card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.6rem 1.4rem 1.8rem;
  background: #fff;
  color: var(--navy);
  border-radius: 18px;
  text-align: center;
}
.idmodal__cerrar {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  padding: 0.3rem 0.55rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--steel);
  cursor: pointer;
}
.idmodal__titulo { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; margin-bottom: 0.2rem; }
.idmodal__sub { color: var(--steel); font-size: 0.9rem; margin-bottom: 1.1rem; }
.idmodal__error {
  background: #fdecea;
  color: #8a1c13;
  border-radius: 8px;
  padding: 0.6em 0.8em;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.idmodal__personas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 0.4rem;
}
.idmodal__persona {
  min-height: 64px;
  padding: 1rem 0.6rem;
  background: #f1f2f6;
  color: var(--navy);
  border: 2px solid transparent;
  border-radius: 12px;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}
.idmodal__persona:active { background: #e0e2ea; }
.idmodal__persona.is-sel { border-color: var(--navy); background: #fff; }
.idmodal__vacio { color: var(--steel); font-size: 0.9rem; background: #f1f2f6; border-radius: 10px; padding: 1em; }
.idmodal__pinbox { margin-top: 0.4rem; }
.idmodal__quien { font-family: var(--font-head); font-weight: 600; margin-bottom: 0.7rem; font-size: 1.05rem; }
.idmodal__dots { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.2rem; }
.idmodal__dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--navy); box-sizing: border-box; }
.idmodal__dots span.on { background: var(--navy); }
.idmodal__pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.idmodal__pad button {
  min-height: 66px;
  padding: 0.6rem 0;
  font-size: 1.7rem;
  font-family: var(--font-head);
  font-weight: 600;
  background: #f1f2f6;
  color: var(--navy);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.idmodal__pad button:active { background: #d7d9e3; transform: scale(0.97); }
.idmodal__pad button.idmodal__aux { font-size: 1.2rem; background: #e9eaf0; color: var(--steel); }
.idmodal__pad.is-checking { opacity: 0.55; pointer-events: none; }
.idmodal__volver {
  margin-top: 0.9rem;
  background: none;
  border: none;
  color: var(--steel);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

/* Paso 2 del modal de identidad: "¿Alguien más trabajó contigo?" (casillas). */
.idmodal__companeros { margin-top: 0.4rem; text-align: left; }
.idmodal__companeros-intro { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; margin-bottom: 0.25rem; text-align: center; }
.idmodal__companeros-ayuda { color: var(--steel); font-size: 0.85rem; margin-bottom: 0.9rem; text-align: center; }
.idmodal__companeros-lista { display: flex; flex-direction: column; gap: 0.5rem; max-height: 42vh; overflow-y: auto; }
.idmodal__companero {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65em 0.75em;
  background: #f1f2f6;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
}
.idmodal__companero input { width: 20px; height: 20px; flex: none; }
.idmodal__companeros-vacio { color: var(--steel); font-size: 0.9rem; background: #f1f2f6; border-radius: 10px; padding: 1em; text-align: center; }
.idmodal__companeros-ok { margin-top: 1rem; }

/* "¿Alguien más trabajó contigo?" en formulario (panel de admin, sin PIN). */
.companeros-campo { margin-top: 1.2rem; }
.companeros-opcional { color: var(--steel); font-weight: normal; font-size: 0.85rem; }
.companeros-lista { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 0.5rem; }
.companeros-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.92rem; cursor: pointer; }
.companeros-item input { width: 17px; height: 17px; flex: none; }

/* "¿Queda algo pendiente por hacer en esta unidad?" (Finalizar / Trabajo rápido). */
.pendiente-campo { margin-top: 1.2rem; }
.pendiente-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; cursor: pointer; }
.pendiente-check input { width: 17px; height: 17px; flex: none; }
.pendiente-detalle { margin-top: 0.6rem; }
.pendiente-detalle textarea {
  width: 100%;
  padding: 0.6em 0.7em;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  resize: vertical;
}
.pendiente-detalle textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.pendiente-ayuda { margin: 0.35rem 0 0; color: var(--steel); font-size: 0.85rem; }

/* ---- Pantalla de Inicio del panel ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .stat-grid { grid-template-columns: 1fr; } }
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1rem 1.1rem;
  background: #FAF9F5;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.stat__num { font-family: var(--font-head); font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--navy); }
.stat__label { font-family: var(--font-head); font-size: 0.9rem; color: var(--navy); }
.stat__sub { font-size: 0.8rem; color: var(--steel); }

.actividad { list-style: none; margin: 0; padding: 0; }
.actividad__item {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 0.7rem;
  padding: 0.7em 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.actividad__item:last-child { border-bottom: none; }
.actividad__tag {
  flex-shrink: 0;
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 20px;
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.actividad__tag--mant { background: #E7EBF8; color: var(--blue); }
.actividad__tag--fluido { background: #F3E3C1; color: #8A5A12; }
.actividad__texto { flex: 1 1 240px; }
.actividad__hace { flex-shrink: 0; color: var(--steel); font-size: 0.82rem; white-space: nowrap; }

/* Guía de uso bajo el título de cada formulario de Mantenimientos: deja claro
   CUÁNDO usar "Iniciar mantenimiento" vs "Registrar trabajo rápido". Solo es
   texto de ayuda; no cambia la lógica de ninguno de los dos formularios. */
.uso-guia {
  margin: 0.2rem 0 1rem;
  padding: 0.7em 0.9em;
  border-left: 3px solid var(--line);
  background: #f1f2f6;
  border-radius: 0 8px 8px 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--charcoal);
}
.uso-guia strong { font-family: var(--font-head); letter-spacing: 0.2px; }
.uso-guia--detiene { border-left-color: var(--red); background: #FCEEED; }
.uso-guia--rapido { border-left-color: #0C6B5E; background: #E4F1EE; }

/* Pantalla "Reportes": uso principal en la tablet táctil del taller. Mismo
   criterio de tamaños que el modal "Identifícate" (idmodal__persona /
   idmodal__pad button: min-height ~64-66px, radios grandes, texto legible). */
/* Ancho explícito e IDÉNTICO en ambos (no depender de la regla genérica
   ".field select/textarea"): mismo box-sizing, mismo display, mismo 100%. */
select.reportes-select,
textarea.reportes-textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.9em 1em;
  font-size: 1.15rem;
  border-radius: 8px;
}
select.reportes-select {
  min-height: 3.6rem;
}
textarea.reportes-textarea {
  min-height: 9rem; /* ~5-6 líneas visibles */
  line-height: 1.5;
  resize: vertical;
}
.btn-submit--grande { min-height: 3.7rem; font-size: 1.2rem; border-radius: 8px; }
.btn-submit--atender {
  width: auto;
  min-height: 3.3rem;
  padding: 0.7em 1.6em;
  font-size: 1.05rem;
  border-radius: 8px;
}
.reportes-tabla th, .reportes-tabla td { padding: 1em 0.8em; font-size: 1.02rem; }

/* ---------- Buscador global (panel-nav, admin/administrativo) ---------- */
.gsearch { position: relative; }
.gsearch__abrir { display: none; background: transparent; border: 1px solid rgba(255,255,255,0.35); color: #fff; border-radius: 6px; width: 36px; height: 34px; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.gsearch__abrir svg { width: 18px; height: 18px; }
.gsearch__caja { position: relative; }
.gsearch__campo { position: relative; }
.gsearch__lupa { position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #9aa3c7; pointer-events: none; }
.gsearch__input { width: 280px; font: inherit; font-size: 0.88rem; color: #fff; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25); border-radius: 6px; padding: 0.45em 0.7em 0.45em 2.1em; outline: none; transition: background 0.15s, border-color 0.15s; }
.gsearch__input::placeholder { color: #aab2d4; }
.gsearch__input:focus { background: #fff; color: var(--navy); border-color: #fff; }
.gsearch__input:focus::placeholder { color: var(--steel); }
.gsearch__resultados { position: absolute; top: calc(100% + 6px); right: 0; width: 380px; max-height: 70vh; overflow-y: auto; background: #fff; border-radius: 8px; box-shadow: 0 10px 30px rgba(18,32,92,0.25); border: 1px solid var(--line); padding: 0.35rem 0; z-index: 200; }
.gsearch__grupo { font-family: var(--font-head); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--steel); padding: 0.55rem 0.9rem 0.25rem; }
.gsearch__item { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.9rem; text-decoration: none; color: var(--navy); }
.gsearch__item:hover, .gsearch__item:focus { background: #F2F4FA; outline: none; }
.gsearch__tipo { flex: none; font-family: var(--font-head); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; border-radius: 4px; padding: 0.15em 0.45em; min-width: 5.2em; text-align: center; }
.gsearch__tipo--unidades { background: #E7EBF8; color: var(--blue); }
.gsearch__tipo--operadores { background: #F3E3C1; color: #8A5A12; }
.gsearch__tipo--clientes { background: #E4F1EE; color: #0C6B5E; }
.gsearch__txt { display: flex; flex-direction: column; min-width: 0; }
.gsearch__titulo { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsearch__detalle { font-size: 0.78rem; color: var(--steel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsearch__vacio { padding: 0.8rem 0.9rem; color: var(--steel); font-size: 0.9rem; }
@media (max-width: 900px) {
  .gsearch__input { width: 200px; }
}
/* Angosto: solo el botón de lupa; al abrirlo, el campo ocupa todo el ancho bajo la barra. */
@media (max-width: 720px) {
  .gsearch__abrir { display: inline-flex; }
  .gsearch__caja { display: none; }
  .gsearch.is-open .gsearch__caja { display: block; position: fixed; top: var(--panel-nav-h); left: 0; right: 0; background: var(--navy); padding: 0.6rem 0.8rem; box-shadow: 0 6px 14px rgba(0,0,0,0.25); z-index: 200; }
  .gsearch.is-open .gsearch__input { width: 100%; font-size: 16px; }
  .gsearch__resultados { position: static; width: auto; margin-top: 0.5rem; max-height: 65vh; }
}
