/* ============================================================
   BOTICASB - ETAPA 7.7
   Identificación moderna de cajero
   ============================================================ */

.botica-operador-bloqueo {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  background:
    radial-gradient(
      circle at 50% 15%,
      rgba(16, 185, 129, .10),
      transparent 34%
    ),
    rgba(15, 23, 42, .80);
  backdrop-filter: blur(5px);
}

.botica-operador-card {
  width: 100%;
  max-width: 430px;
  margin: auto;
  padding: 24px 26px 20px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 24px;
  background: #fff;
  box-shadow:
    0 30px 80px rgba(15, 23, 42, .34),
    0 2px 8px rgba(15, 23, 42, .10);
  text-align: left;
}

.botica-operador-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.botica-operador-seguro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
}

.botica-operador-paso {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
}

.botica-operador-icono {
  display: flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  margin: 4px auto 8px;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  background:
    linear-gradient(
      145deg,
      #ecfdf5,
      #dcfce7
    );
  color: #15803d;
  box-shadow: 0 8px 22px rgba(22, 163, 74, .12);
  font-size: 27px;
}

.botica-operador-card h3 {
  margin: 6px 0 5px;
  color: #172033;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  letter-spacing: -.02em;
}

.botica-operador-intro {
  max-width: 350px;
  margin: 0 auto 18px !important;
  color: #64748b !important;
  font-size: 12px;
  line-height: 1.5;
  text-align: center !important;
}

.botica-operador-label {
  display: block;
  margin: 0 0 6px !important;
  color: #334155 !important;
  font-size: 11px;
  font-weight: 800 !important;
}

.botica-operador-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  overflow: hidden;
  border: 1.5px solid #cbd5e1;
  border-radius: 13px;
  background: #fff;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}

.botica-operador-input-wrap:focus-within {
  border-color: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .10);
}

.botica-operador-input-wrap.buscando {
  border-color: #38bdf8;
  background: #f8fdff;
}

.botica-operador-input-wrap.valido {
  border-color: #22c55e;
  background: #f7fff9;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .08);
}

.botica-operador-input-wrap.invalido {
  border-color: #ef4444;
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .07);
}

.botica-operador-input-icon {
  display: inline-flex;
  width: 46px;
  min-width: 46px;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 17px;
}

.botica-operador-card
#botica-operador-dni-input {
  height: 50px;
  flex: 1;
  margin: 0 !important;
  padding: 0 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none !important;
  color: #172033;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .16em;
  outline: 0 !important;
}

.botica-operador-card
#botica-operador-dni-input::placeholder {
  color: #b6c0cc;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.botica-operador-input-estado {
  display: inline-flex;
  width: 42px;
  min-width: 42px;
  align-items: center;
  justify-content: center;
  color: #16a34a;
  font-size: 17px;
}

.botica-operador-input-wrap.invalido
.botica-operador-input-estado {
  color: #dc2626;
}

.botica-operador-input-wrap.buscando
.botica-operador-input-estado {
  color: #0284c7;
}

.botica-operador-ayuda {
  margin: 7px 2px 10px;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.4;
  text-align: left;
}

.botica-operador-preview[hidden] {
  display: none !important;
}

.botica-operador-preview {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  background:
    linear-gradient(
      135deg,
      #f0fdf4,
      #f8fffb
    );
  animation: boticaPreviewEntrada .18s ease;
}

@keyframes boticaPreviewEntrada {
  from {
    transform: translateY(-4px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.botica-operador-preview-avatar {
  display: flex;
  width: 44px;
  height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: #16a34a;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .04em;
  box-shadow: 0 5px 13px rgba(22, 163, 74, .18);
}

.botica-operador-preview-datos {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.botica-operador-preview-ok {
  margin-bottom: 2px;
  color: #15803d;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .06em;
}

#botica-operador-preview-nombre {
  overflow: hidden;
  color: #172033;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#botica-operador-preview-perfil {
  margin-top: 1px;
  overflow: hidden;
  color: #64748b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.botica-operador-mensaje {
  min-height: 20px;
  margin: 4px 2px 8px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.botica-operador-mensaje.error {
  color: #b91c1c;
}

.botica-operador-mensaje.ok {
  color: #15803d;
}

.botica-operador-teclado {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 276px;
  margin: 5px auto 14px;
}

.botica-operador-teclado button {
  display: flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbe3ea;
  border-radius: 14px;
  background:
    linear-gradient(
      180deg,
      #293744,
      #202b35
    );
  color: #fff;
  box-shadow:
    0 4px 9px rgba(15, 23, 42, .14),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  transition:
    transform .08s ease,
    border-color .15s ease,
    background .15s ease,
    box-shadow .15s ease;
}

.botica-operador-teclado button:hover,
.botica-operador-teclado button:focus {
  border-color: #22c55e;
  background: #166534;
  outline: none;
  box-shadow:
    0 0 0 3px rgba(22, 163, 74, .12),
    0 5px 12px rgba(15, 23, 42, .16);
}

.botica-operador-teclado button:active {
  transform: translateY(1px) scale(.97);
}

.botica-operador-teclado .botica-tecla-accion {
  flex-direction: column;
  gap: 2px;
  border-radius: 14px;
  font-size: 14px;
}

.botica-operador-teclado .botica-tecla-accion small {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.botica-operador-teclado
.botica-tecla-accion.limpiar {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.botica-operador-teclado
.botica-tecla-accion.borrar {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.botica-operador-validar {
  display: flex !important;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 14px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: #cbd5e1 !important;
  color: #64748b !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .04em;
  cursor: not-allowed;
  transition:
    transform .12s ease,
    background .15s ease,
    box-shadow .15s ease;
}

.botica-operador-validar.listo:not(:disabled) {
  background:
    linear-gradient(
      135deg,
      #16a34a,
      #0f766e
    ) !important;
  color: #fff !important;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 118, 110, .20) !important;
}

.botica-operador-validar.listo:not(:disabled):hover,
.botica-operador-validar.listo:not(:disabled):focus {
  transform: translateY(-1px);
  outline: none;
  box-shadow: 0 10px 24px rgba(15, 118, 110, .25) !important;
}

.botica-operador-validar-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
}

.botica-operador-volver {
  display: flex;
  min-height: 37px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none !important;
}

.botica-operador-volver:hover,
.botica-operador-volver:focus {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #334155;
}

.botica-operador-privacidad {
  margin-top: 9px;
  color: #a1aab6;
  font-size: 8px;
  line-height: 1.35;
  text-align: center;
}

.botica-operador-privacidad i {
  margin-right: 3px;
}

@media (max-height: 760px) and (min-width: 768px) {
  .botica-operador-bloqueo {
    align-items: flex-start;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .botica-operador-card {
    padding-top: 17px;
    padding-bottom: 15px;
  }

  .botica-operador-icono {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }

  .botica-operador-card h3 {
    font-size: 20px;
  }

  .botica-operador-intro {
    margin-bottom: 12px !important;
  }

  .botica-operador-teclado button {
    height: 42px;
  }
}

@media (max-width: 575px) {
  .botica-operador-bloqueo {
    align-items: flex-start;
    padding: 10px;
  }

  .botica-operador-card {
    max-width: none;
    margin-top: 8px;
    padding: 18px 16px 15px;
    border-radius: 20px;
  }

  .botica-operador-card-top {
    margin-bottom: 8px;
  }

  .botica-operador-icono {
    width: 54px;
    height: 54px;
    border-radius: 17px;
    font-size: 23px;
  }

  .botica-operador-card h3 {
    font-size: 21px;
  }

  .botica-operador-intro {
    margin-bottom: 13px !important;
    font-size: 11px;
  }

  .botica-operador-input-wrap {
    height: 50px;
  }

  .botica-operador-teclado {
    max-width: 262px;
    gap: 7px;
  }

  .botica-operador-teclado button {
    height: 46px;
    border-radius: 13px;
  }
}


/* Barra superior del cajero identificado */
.botica-operador-barra {
  position: relative;
  z-index: 50;
  box-sizing: border-box;
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 10px 10px 230px;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid #86efac;
  border-radius: 0 0 10px 10px;
  background: #ecfdf5;
  color: #14532d;
}

.botica-operador-identidad {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.botica-operador-avatar {
  display: inline-flex;
  width: 34px;
  height: 34px;
  min-width: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 15px;
  line-height: 1;
}

.botica-operador-datos {
  min-width: 0;
}

.botica-operador-etiqueta {
  display: block;
  margin-bottom: 1px;
  color: #15803d;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.botica-operador-linea {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 9px;
  line-height: 1.25;
}

#botica-operador-nombre {
  display: block;
  overflow: hidden;
  color: #14532d;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#botica-operador-dni {
  flex: 0 0 auto;
  margin: 0;
  color: #64748b;
  font-size: 10px;
  white-space: nowrap;
}

.botica-cambiar-operador {
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* AdminLTE: cuando el menú lateral está contraído */
@media (min-width: 768px) {
  body.sidebar-collapse .botica-operador-barra {
    margin-left: 50px;
  }
}

/* Tablet y celular */
@media (max-width: 767px) {
  .botica-operador-barra {
    min-height: 58px;
    margin: 0 7px 8px;
    padding: 7px 8px;
    gap: 8px;
    border-radius: 8px;
  }

  .botica-operador-avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
    font-size: 13px;
  }

  .botica-operador-linea {
    display: block;
  }

  #botica-operador-nombre {
    max-width: 54vw;
    font-size: 12px;
  }

  #botica-operador-dni {
    display: block;
    margin-top: 2px;
    font-size: 9px;
  }

  .botica-cambiar-operador {
    padding: 6px 8px;
  }

  .botica-cambiar-operador span {
    display: none;
  }

  .botica-operador-card {
    padding: 22px;
  }

  .botica-operador-teclado {
    max-width: 250px;
    gap: 8px;
  }

  .botica-operador-teclado button {
    height: 50px;
    font-size: 21px;
  }
}


/* =============================================================
   ETAPA 3.2 - CONTROL DE TURNOS
   ============================================================= */
.botica-operador-turno {
  display: inline-block;
  margin-left: 8px;
  color: #15803d;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.botica-operador-preview-turno {
  display: block;
  margin-top: 3px;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
}

.botica-turnos-control-box {
  border-top: 3px solid #0f766e;
}

.botica-turnos-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.botica-turnos-control h4 {
  margin: 4px 0 4px;
  font-weight: 800;
  color: #16324f;
}

.botica-turnos-control p {
  margin: 0;
  color: #64748b;
}

.botica-turnos-kicker {
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.botica-turnos-control-estado {
  min-width: 250px;
  text-align: right;
}

.botica-turnos-control-estado > span {
  display: inline-block;
  margin-bottom: 5px;
  font-size: 11px;
}

.botica-turnos-control-estado small {
  display: block;
  margin-bottom: 8px;
  color: #64748b;
}

.botica-operadores-acciones {
  white-space: nowrap;
}

.botica-turnos-modal-header {
  background: linear-gradient(135deg, #0f766e, #0b5f59);
  color: #fff;
}

.botica-turnos-modal-header small {
  display: block;
  margin-top: 3px;
  color: #d1fae5;
}

.botica-tabla-turnos th,
.botica-tabla-turnos td {
  vertical-align: middle !important;
}

.botica-tabla-turnos td:nth-child(2) {
  width: 80px;
  text-align: center;
}

.botica-tabla-turnos input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.botica-turno-extra-form label {
  font-size: 11px;
  color: #475569;
}

@media (max-width: 767px) {
  .botica-turnos-control {
    display: block;
  }
  .botica-turnos-control-estado {
    margin-top: 14px;
    text-align: left;
  }
  .botica-operador-turno {
    display: block;
    margin: 2px 0 0;
  }
}
