/* ============================================================
 * GoExperiencia — admin.css
 * Estilos EXCLUSIVOS del panel admin.
 * Este archivo REUTILIZA todo styles.css del sitio público.
 * Solo agrega lo mínimo necesario para el modo admin.
 * ============================================================ */

/* --- Topbar admin ------------------------------------------ */
.admin-topbar {
  background: #1B2E4B;
  color: #fff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.admin-topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-topbar__badge {
  background: #F5A623;
  color: #1B2E4B;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.admin-topbar__title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.admin-topbar__user {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  margin-right: 12px;
}
.btn-logout {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s;
}
.btn-logout:hover {
  background: rgba(255,255,255,0.22);
}

/* --- Banner info ------------------------------------------- */
.admin-banner {
  background: #EFF6FF;
  border-bottom: 1px solid #BFDBFE;
  padding: 12px 24px;
  font-size: 0.82rem;
  color: #1e40af;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Botón Editar precio ----------------------------------- */
.btn-editar-precio {
  background: none;
  border: 1.5px solid #2DC5A2;
  color: #2DC5A2;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  margin-top: 8px;
  width: 100%;
  display: block;
}
.btn-editar-precio:hover {
  background: #2DC5A2;
  color: #fff;
}

/* --- Estado de edición ------------------------------------ */
.pkg-card.editando .btn-editar-precio {
  display: none; /* ocultar "Editar" cuando está en modo edición */
}

/* Wrapper del input de precio */
.precio-edit-wrap {
  display: none;
  margin-top: 8px;
  flex-direction: column;
  gap: 6px;
}
.pkg-card.editando .precio-edit-wrap {
  display: flex;
}

.precio-edit-input {
  width: 100%;
  padding: 8px 10px;
  border: 2px solid #2DC5A2;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1B2E4B;
  font-family: 'Inter', sans-serif;
  outline: none;
  background: #fff;
  box-sizing: border-box;
}
.precio-edit-input:focus {
  border-color: #1B2E4B;
  box-shadow: 0 0 0 3px rgba(45,197,162,0.15);
}

/* Botones Guardar / Cancelar */
.precio-actions {
  display: flex;
  gap: 6px;
}
.btn-guardar-precio {
  flex: 1;
  background: #2DC5A2;
  border: none;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s;
}
.btn-guardar-precio:hover:not(:disabled) {
  background: #22a88a;
}
.btn-guardar-precio:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.btn-cancelar-precio {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #4f6070;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s;
}
.btn-cancelar-precio:hover {
  background: #e2e8f0;
}

/* Mensaje de estado (guardado / error) */
.precio-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
  display: none;
}
.precio-status.ok {
  display: block;
  background: #d1fae5;
  color: #065f46;
}
.precio-status.err {
  display: block;
  background: #fee2e2;
  color: #991b1b;
}

/* --- Login page ------------------------------------------- */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1B2E4B 0%, #2DC5A2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.login-logo {
  text-align: center;
  margin-bottom: 24px;
}
.login-logo img {
  height: 56px;
  width: auto;
}
.login-logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1B2E4B;
  margin-top: 8px;
}
.login-logo-text em {
  color: #2DC5A2;
  font-style: normal;
}
.login-badge {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 28px;
}
.login-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1B2E4B;
  margin-bottom: 4px;
}
.login-card p {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 24px;
}
.login-field {
  margin-bottom: 16px;
}
.login-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #4f6070;
  margin-bottom: 6px;
}
.login-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #dde2ec;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1e2d3d;
  background: #f5f7fa;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}
.login-field input:focus {
  border-color: #2DC5A2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(45,197,162,0.15);
}
.btn-login {
  width: 100%;
  background: #1B2E4B;
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  margin-top: 8px;
  font-family: 'Inter', sans-serif;
}
.btn-login:hover:not(:disabled) {
  background: #2DC5A2;
}
.btn-login:disabled {
  opacity: .7;
  cursor: not-allowed;
}
.login-error {
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 7px;
  margin-top: 14px;
  display: none;
}
.login-error.show {
  display: block;
}

/* --- Grid del admin (reutiliza el grid público) ----------- */
.admin-section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1B2E4B;
  margin: 36px 0 8px;
  padding: 0 4px;
}
.admin-section-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 24px;
  padding: 0 4px;
}

/* Loading spinner */
.admin-loading {
  text-align: center;
  padding: 60px 24px;
  color: #94a3b8;
  font-size: 1rem;
}
.admin-loading::before {
  content: '';
  display: block;
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: #2DC5A2;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .login-card { padding: 28px 20px; }
  .admin-topbar { flex-wrap: wrap; gap: 8px; }
}
