/* Movilidad sostenible — público + admin */

/* Alinear layout admin con Formaciones / module_app_ui (sin padding extra de section) */
body.movilidad-app.module-app-ui .admin-layout#adminLayout {
  max-width: none;
  width: auto;
  min-height: 0;
  display: block;
  align-items: stretch;
  padding: 24px 20px;
  margin: 0;
}

body.movilidad-app.module-app-ui #sec_movilidad.section.demo-section {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  width: 100%;
  max-width: none !important;
  padding: 0 !important;
  margin: 0;
}

.mov-public-page .ent-page-title i {
  color: #2d6a4f;
  margin-right: 0.35rem;
}

.mov-offline-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  background: #3d2c02;
  color: #ffe8a3;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.mov-public-page #wrapFoto.form-group-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.35rem;
  margin-bottom: 0.85rem;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.mov-public-page #fotoBox.ent-foto-inline {
  position: relative;
  width: 100%;
  max-width: min(100%, 520px);
  margin: 0 auto;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  box-sizing: border-box;
}

.mov-public-page #fotoBox .ent-foto-video,
.mov-public-page #fotoBox .ent-foto-canvas,
.mov-public-page #fotoBox .ent-foto-preview {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 200px;
  max-height: min(48vh, 340px);
  object-fit: cover;
  background: #111;
  box-sizing: border-box;
}

.mov-public-page #fotoBox .ent-foto-canvas {
  display: none;
}

.mov-public-page #fotoBox .ent-foto-video.hidden,
.mov-public-page #fotoBox .ent-foto-preview[hidden] {
  display: none !important;
}

.mov-public-page #fotoBox .ent-foto-switch-overlay {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 5;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(75, 85, 99, 0.92) !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.mov-public-page #fotoBox .ent-foto-switch-overlay.hidden,
.mov-public-page #fotoBox .ent-foto-switch-overlay[hidden] {
  display: none !important;
}

.mov-public-page #fotoBox .ent-foto-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
}

.mov-public-page #fotoBox .ent-foto-actions.hidden,
.mov-public-page #fotoBox .ent-foto-actions[hidden] {
  display: none !important;
}

.mov-public-page #btnTomarFoto.ent-foto-trigger {
  min-width: min(280px, 100%);
  justify-content: center;
  font-weight: 700 !important;
  border: 1px solid transparent !important;
  color: #fff !important;
}

.mov-public-page #btnTomarFoto.ent-foto-trigger[hidden],
.mov-public-page #btnTomarFoto.ent-foto-trigger.hidden {
  display: none !important;
}

.mov-public-page #btnTomarFoto.ent-foto-trigger.mov-foto-btn--entrada {
  background: #2d6a4f !important;
  border-color: #1b4332 !important;
}

.mov-public-page #btnTomarFoto.ent-foto-trigger.mov-foto-btn--entrada:hover:not(:disabled) {
  background: #1b4332 !important;
  border-color: #081c15 !important;
}

.mov-public-page #btnTomarFoto.ent-foto-trigger.mov-foto-btn--salida {
  background: #d41316 !important;
  border-color: #b01013 !important;
}

.mov-public-page #btnTomarFoto.ent-foto-trigger.mov-foto-btn--salida:hover:not(:disabled) {
  background: #b01013 !important;
  border-color: #8f0e10 !important;
}

.mov-public-page #btnTomarFoto.ent-foto-trigger:disabled {
  opacity: 0.55 !important;
}

.mov-pending-count {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.mov-estado-box {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.mov-estado-box--exito {
  margin-top: 1rem;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-left: 4px solid #2d6a4f;
  border-radius: 10px;
  background: #fff;
  text-align: left;
}

.mov-public-page #btnGuardar.mov-guardar-btn--entrada {
  background: #2d6a4f !important;
}

.mov-public-page #btnGuardar.mov-guardar-btn--entrada:hover:not(:disabled) {
  background: #1b4332 !important;
}

.mov-public-page #btnGuardar.mov-guardar-btn--salida {
  background: #d41316 !important;
}

.mov-public-page #btnGuardar.mov-guardar-btn--salida:hover:not(:disabled) {
  background: #b01013 !important;
}

.mov-proxima {
  margin-bottom: 0.4rem;
}

.mov-descansos-resumen {
  margin-bottom: 0.65rem;
  color: #3a5a40;
  font-weight: 600;
}

.mov-progress-wrap {
  margin-top: 0.35rem;
}

.mov-progress-label {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.mov-progress-bar {
  height: 12px;
  background: #e8efe9;
  border-radius: 999px;
  overflow: hidden;
}

.mov-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #40916c, #2d6a4f);
  transition: width 0.35s ease;
}

.mov-progress-sub {
  font-size: 0.8rem;
  color: #555;
  margin-top: 0.25rem;
}

.mov-gps-hint {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.5rem;
  text-align: center;
}

.mov-motivacional {
  margin-top: 0.85rem;
  font-weight: 600;
  color: #2d6a4f;
}

.mov-exito-progress {
  margin-top: 1rem;
  text-align: left;
}

.movilidad-app .mov-admin-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.mov-alta-form,
.mov-params-form {
  margin-bottom: 1rem;
}

.mov-params-form input,
.mov-params-form textarea {
  padding: 0.45rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.mov-params-form .form-group {
  margin-bottom: 0.85rem;
}

.mov-params-form textarea {
  width: 100%;
  max-width: 640px;
}

.mov-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}

body.movilidad-app .inf-filtros-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.mov-gps {
  font-size: 0.75rem;
  max-width: 140px;
  word-break: break-all;
}

.movilidad-app .for-modal-card--sm {
  max-width: min(420px, 100%);
}

.movilidad-app .for-modal-card--md {
  max-width: min(720px, 100%);
}

.mov-detalle {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mov-detalle-dl--head {
  margin: 0 0 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
}

.mov-detalle-dl--head > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 6px;
  align-items: start;
  font-size: 13px;
  line-height: 1.35;
}

.mov-detalle-dl--head .mov-detalle-dl__obs {
  grid-column: 1 / -1;
}

.mov-detalle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mov-detalle-lado {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #fafafa;
}

.mov-detalle-lado h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.mov-detalle-foto-wrap {
  text-align: center;
  margin-bottom: 6px;
}

.mov-detalle-foto {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 200px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #111;
}

.mov-detalle-empty {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.mov-detalle-dl {
  margin: 0;
  display: grid;
  gap: 4px;
}

.mov-detalle-dl > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 6px;
  align-items: start;
  font-size: 13px;
  line-height: 1.3;
}

.mov-detalle-gps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mov-detalle-map-wrap {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #e5e7eb;
}

.mov-detalle-map {
  display: block;
  width: 100%;
  height: 200px;
  border: 0;
}

.mov-detalle-dl dt {
  margin: 0;
  font-weight: 700;
  color: #374151;
}

.mov-detalle-dl dd {
  margin: 0;
  color: #111827;
  word-break: break-word;
}

.mov-detalle-maps {
  color: var(--dot-brand, #d41316);
  font-weight: 600;
  text-decoration: none;
}

.mov-detalle-maps:hover {
  text-decoration: underline;
}

.mov-detalle-lado__acc {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.mov-detalle-corr-btn,
.mov-detalle-asociar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
}

.mov-asociar-panel {
  margin-top: 10px;
}

.mov-asociar-panel__title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
}

.mov-asociar-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.mov-asociar-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.mov-asociar-item:hover {
  border-color: #d41316;
  background: #fff5f5;
}

.mov-asociar-item__tipo {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
}

.mov-asociar-item__cuando {
  font-size: 12px;
  color: #6b7280;
}

@media (max-width: 720px) {
  .mov-detalle-grid,
  .mov-detalle-dl--head {
    grid-template-columns: 1fr;
  }
}

.mov-alta-form .form-group {
  margin-bottom: 0;
}

.mov-alta-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 13px;
  color: #333;
}

.mov-alta-form .label-req {
  color: var(--dot-brand, #d41316);
}

.mov-alta-search-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.mov-alta-search-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.mov-alta-search-row .dot-btn-primary {
  flex: 0 0 auto;
  white-space: nowrap;
}

.mov-alta-form input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mov-alta-form input:hover {
  border-color: var(--dot-brand, #d41316) !important;
}

.mov-alta-form input:focus {
  outline: none;
  border-color: var(--dot-brand, #d41316) !important;
  box-shadow: var(--focus-ring, 0 0 0 3px rgba(212, 19, 22, 0.1));
}

.mov-alta-empleado {
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-left: 4px solid #e94035;
  border-radius: 10px;
  background: #ffffff;
  font-size: 14px;
}

.mov-alta-empleado p {
  margin: 0;
  color: #374151;
}

.mov-alta-empleado p + p {
  margin-top: 6px;
}

.hidden {
  display: none !important;
}

/* Mantener tabla real en móvil (scroll horizontal), no cards apiladas */
@media (max-width: 720px) {
  body.movilidad-app.module-app-ui .edd-list-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.movilidad-app.module-app-ui .edd-list-table {
    min-width: 720px;
    width: 100%;
    border-collapse: collapse;
  }

  body.movilidad-app.module-app-ui .edd-list-table thead {
    display: table-header-group;
  }

  body.movilidad-app.module-app-ui .edd-list-table tbody {
    display: table-row-group;
  }

  body.movilidad-app.module-app-ui .edd-list-table tr {
    display: table-row;
    margin: 0;
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
  }

  body.movilidad-app.module-app-ui .edd-list-table th,
  body.movilidad-app.module-app-ui .edd-list-table td {
    display: table-cell;
    justify-content: unset;
    gap: 0;
    border-bottom: 1px solid #e8e8e8;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.35;
    vertical-align: middle;
    text-align: left;
  }

  body.movilidad-app.module-app-ui .edd-list-table th {
    font-weight: 700;
    white-space: nowrap;
  }

  body.movilidad-app.module-app-ui .edd-list-table td:last-child {
    border-bottom: 1px solid #e8e8e8;
  }

  body.movilidad-app.module-app-ui .edd-list-table td::before {
    content: none;
  }

  body.movilidad-app.module-app-ui .edd-list-empty {
    display: table-cell !important;
  }
}

body.movilidad-app .mov-estado-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  padding: 4px 8px;
  border-radius: 999px;
}

body.movilidad-app .mov-estado-tag--completo {
  color: #166534;
  background: #dcfce7;
}

body.movilidad-app .mov-estado-tag--incompleto {
  color: #9a3412;
  background: #ffedd5;
}

.mov-historial {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mov-historial__totales {
  margin: 0;
  font-size: 13px;
  color: #374151;
}

.mov-historial__acc {
  display: flex;
}

.mov-historial__acc .mov-historial-reclamar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mov-historial__acc .mov-historial-reclamar:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mov-historial__lista {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #111827;
  max-height: 320px;
  overflow: auto;
}

body.movilidad-app .rf-pagination {
  margin: 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid #eee;
  background: #fafafa;
}

body.movilidad-app .rf-page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font-size: 12px;
  color: #374151;
}

body.movilidad-app .rf-page-size__select {
  min-height: 34px;
  min-width: 72px;
  padding: 0 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 13px;
}

body.movilidad-app .rf-page-info {
  font-size: 12px;
  color: #374151;
}

body.movilidad-app .rf-page-btn {
  min-height: 34px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  box-sizing: border-box;
}

body.movilidad-app .rf-page-btn--icon {
  padding: 0;
  width: 34px;
}

body.movilidad-app .rf-page-btn:hover {
  border-color: #e8c1c4;
  background: var(--dot-brand-light, #f4d3d5);
  color: var(--dot-brand, #d41316);
}

body.movilidad-app .rf-page-btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

@media (max-width: 720px) {
  body.movilidad-app.module-app-ui {
    padding-bottom: calc(40px + 72px);
  }

  body.movilidad-app .rf-pagination {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 40px;
    z-index: 90;
    margin: 0;
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  body.movilidad-app.module-app-ui {
    padding-bottom: calc(44px + 80px);
  }

  body.movilidad-app .rf-pagination {
    bottom: 44px;
  }
}

