.te-login-sheet {
  position: fixed;
  inset: 0;
  z-index: 100000;
  pointer-events: none;
}

.te-login-sheet.is-open {
  pointer-events: auto;
}

.te-login-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.te-login-sheet.is-open .te-login-sheet__backdrop {
  opacity: 1;
}

.te-login-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 12px 24px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.te-login-sheet.is-open .te-login-sheet__panel {
  transform: translateY(0);
}

.te-login-sheet__handle {
  width: 40px;
  height: 4px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: #e2e8f0;
}

.te-login-sheet__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.te-login-sheet__close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.te-login-sheet__title {
  margin: 0 0 0.35rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.te-login-sheet__desc {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
}

.te-login-sheet__google {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 1rem;
}

.te-login-sheet__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.te-login-sheet__divider::before,
.te-login-sheet__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.te-login-sheet__form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.te-login-sheet__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}

.te-login-sheet__input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.875rem;
  color: #0f172a;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.te-login-sheet__input:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.te-login-sheet__remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0 0.5rem;
  font-size: 0.8125rem;
  color: #64748b;
  cursor: pointer;
}

.te-login-sheet__submit {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 9999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.te-login-sheet__submit:hover:not(:disabled) {
  background: #1d4ed8;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.te-login-sheet__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.te-login-sheet__links {
  margin: 0.875rem 0 0;
  text-align: center;
  font-size: 0.8125rem;
}

.te-login-sheet__links a {
  color: #64748b;
  text-decoration: none;
}

.te-login-sheet__links a:hover {
  color: #2563eb;
  text-decoration: underline;
}

.te-login-sheet__register {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.8125rem;
  color: #64748b;
}

.te-login-sheet__register a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.te-login-sheet__register a:hover {
  text-decoration: underline;
}

/* CTA en tablero cuenta (reemplaza form inline) */
button.te-account-btn {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.te-login-cta {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
}

.te-login-cta h2 {
  margin: 0 0 0.35rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #0f172a;
}

.te-login-cta p {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
}

.te-login-cta__btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 9999px;
  background: #2563eb;
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.te-login-cta__btn:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.te-order-empty--clickable {
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.te-order-empty--clickable:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e40af;
}

@media (min-width: 640px) {
  .te-login-sheet__panel {
    left: 50%;
    right: auto;
    width: 100%;
    transform: translate(-50%, 100%);
    border-radius: 24px 24px 0 0;
  }

  .te-login-sheet.is-open .te-login-sheet__panel {
    transform: translate(-50%, 0);
  }
}
