body.admin-full {
  background-image: url("../../img/fondo.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.admin-layout {
  max-width: 100%;
  width: 100%;
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 30px;
}

.demo-section {
  padding: 24px;
  border-radius: 20px;
  border: 1px solid #00000014;
  background: #ffffff;
  width: 800px;
  max-width: 85%;
  margin: 0 auto;
}

.ent-search-form {
  width: 100%;
}

.ent-page-title {
  font-family: "Roboto", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  line-height: 28px;
  text-align: center;
  margin: 0 0 28px 0;
}

/* Fecha y hora de la vista (encima del campo de cédula) */
.ent-view-timestamp {
  margin: 0 0 14px 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
  color: #6b7280;
}

.ent-search-label {
  margin-bottom: 12px;
}

.ent-required {
  color: #e94035;
}

.ent-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ent-search-input {
  flex: 1;
  min-height: 34px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  color: #4b5563;
  background: #ffffff;
}

.ent-search-input::placeholder {
  font-size: 12px;
  color: #9ca3af;
}

.ent-search-input:focus {
  outline: none;
  border-color: #e94035;
  box-shadow: 0 0 0 2px #3b82f633;
}

.ent-search-btn {
  min-height: 34px;
  border: none;
  border-radius: 10px;
  background: #2f6fe4;
  color: #ffffff;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ent-search-btn:hover {
  background: #255fc7;
}

.ent-employee-result {
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-left: 4px solid #e94035;
  border-radius: 10px;
  background: #ffffff;
}

.ent-employee-result p + p {
  margin-top: 6px;
}

.ent-search-error {
  margin-top: 10px;
  color: #b91c1c;
}

.ent-oficio-form {
  margin-top: 16px;
}

.ent-oficio-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ent-oficio-col {
  min-width: 200px;
  flex: 1 1 240px;
}

.ent-oficio-label {
  display: block;
  margin-bottom: 8px;
}

.ent-oficio-select {
  min-height: 34px;
  min-width: 220px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 12px;
  color: #1f2937;
  background: #ffffff;
}

/* Builder de EPP (sin relación con oficio) */
.ent-epp-builder {
  margin-top: 12px;
}

.ent-epp-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
}

.ent-epp-card-title {
  font-weight: 800;
  color: #1f2937;
  font-size: 16px;
  margin-bottom: 2px;
}

.ent-epp-card-subtitle {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 14px;
}

.ent-epp-add-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.ent-epp-col {
  width: 100%;
}

.ent-epp-qty-talla-col {
  padding: 0;
}

.ent-epp-qty-talla-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.ent-epp-add-btn-col {
  width: 100%;
  display: flex;
  justify-content: center;
}

.ent-epp-add-btn {
  width: auto;
  min-width: 0;
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #3b82f6;
  background: #3b82f6;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.ent-epp-add-btn:hover {
  background: #3b82f6;
}

.ent-epp-rows {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ent-epp-empty {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
}

.ent-epp-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ent-epp-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* Agrupa cantidad/talla + basura: la basura alinea con la fila de inputs */
.ent-epp-item-right {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.ent-epp-item-fields {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.ent-epp-item-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ent-epp-item-field-label {
  font-size: 11px;
  font-weight: 800;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 0;
}

.ent-epp-item-name {
  font-weight: 700;
  font-size: 13px;
  color: #111827;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ent-epp-item-qty-select {
  width: 78px;
  height: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
  background: #ffffff;
  color: #111827;
  box-sizing: border-box;
}

.ent-epp-item-qty-edit {
  appearance: auto;
}

.ent-epp-item-select {
  width: 100%;
  height: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
  background: #ffffff;
  color: #111827;
  box-sizing: border-box;
}

.ent-epp-item-del {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 1px solid #e94035;
  border-radius: 8px;
  background: transparent;
  color: #e94035;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  box-sizing: border-box;
}

.ent-epp-item-talla-input,
.ent-epp-item-talla {
  width: 140px;
  height: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
  background: #ffffff;
  color: #111827;
  box-sizing: border-box;
}

.ent-epp-item-talla {
  margin-top: 0;
}

.ent-epp-item-del:hover {
  background: #fee2e2;
}

.ent-save-form {
  margin-top: 16px;
}

.ent-firma-wrap {
  margin-top: 18px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.ent-firma-label {
  display: block;
  margin-bottom: 6px;
}

.ent-foto-label {
  text-align: center;
}

.ent-firma-help {
  margin-bottom: 10px;
}

.ent-foto-trigger {
  min-height: 34px;
  border: none;
  border-radius: 10px;
  background: #6b7280;
  color: #fff;
  padding: 0 16px;
  display: block;
  align-items: center;
  gap: 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  width: 140px;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.ent-foto-status {
  margin-top: 10px;
  text-align: center;
  font-size: 15px;
  color: #4b5563;
}

.ent-foto-inline {
  margin-top: 14px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.ent-foto-video {
  width: 100%;
  height: min(52vh, 360px);
  box-sizing: border-box;
  border: 2px solid #ef4444;
  border-radius: 12px;
  background: #111827;
  object-fit: cover;
  display: block;
}

.ent-foto-canvas {
  display: none;
  width: 100%;
  height: auto;
  max-height: min(52vh, 360px);
  box-sizing: border-box;
  border: 2px solid #ef4444;
  border-radius: 12px;
  background: #111827;
}

.ent-foto-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 14px;
}

.ent-foto-btn {
  min-height: 34px;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  display: block;
  align-items: center;
  gap: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  width: 140px;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.ent-foto-btn--capture {
  background: #3b82f6;
}

.ent-foto-btn--cancel {
  background: #6b7280;
}

.ent-firma-box {
  width: 100%;
  max-width: 520px;
  height: 300px;
  aspect-ratio: 520 / 180;
  border: 2px solid #ef4444;
  border-radius: 12px;
  background: #ffffff;
  cursor: crosshair;
  touch-action: none;
  margin: 0 auto;
  display: block;
}

.ent-actions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.ent-btn {
  min-height: 34px;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  display: block;
  align-items: center;
  gap: 0;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  width: 140px;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.ent-btn i {
  font-size: 16px;
}

.ent-btn-clear {
  background: #6b7280;
}

.ent-btn-clear:hover {
  background: #4b5563;
}

.ent-btn-save {
  background: #74c69d;
}

.ent-btn-save:hover {
  background: #52b788;
}

.ent-msg-inline {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .admin-layout {
    padding: 10px;
  }

  .demo-section {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px !important;
  }

  .ent-search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ent-oficio-row {
    flex-direction: column;
    gap: 10px;
  }

  .ent-oficio-col {
    min-width: 0;
    width: 100%;
    flex: 0 0 auto;
  }

  .ent-search-btn {
    justify-content: center;
  }

  .ent-actions {
    max-width: 100%;
  }

  .ent-firma-box {
    max-width: 100%;
    height: 160px;
  }

  .ent-btn {
    font-size: 16px;
  }

  .ent-epp-item-top {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .ent-epp-item-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.3;
  }

  .ent-epp-item-right {
    width: 100%;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
  }

  .ent-epp-item-fields {
    flex: 1;
    min-width: 0;
    gap: 8px;
  }

  .ent-epp-item-field {
    flex: 1;
    min-width: 0;
  }

  .ent-epp-item-qty-select,
  .ent-epp-item-talla {
    width: 100%;
  }
}
