@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

:root{
  --card-bg: rgba(255,255,255,0.08);
  --card-border: rgba(255,255,255,0.12);
  --text-muted: rgba(255,255,255,0.72);
  --gold1: #ffcc00;
  --gold2: #ff9900;
  --danger: #ff5a6a;
  --ok: #55ffb0;
}

* { box-sizing: border-box; font-family: 'Poppins', sans-serif; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #1c1c1c, #000);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

/* Decorative orbs */
.bg-orbs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; filter: blur(22px); opacity: 0.25; border-radius: 999px; }
.o1 { width: 260px; height: 260px; left: -80px; top: 8%; background: var(--gold1); }
.o2 { width: 320px; height: 320px; right: -120px; top: 25%; background: #3aa0ff; }
.o3 { width: 220px; height: 220px; left: 20%; bottom: -110px; background: #ff4fd8; }

.login-wrapper {
  width: 100%;
  padding: 18px;
  display: flex;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 38px 28px;
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0,0,0,0.6);
  animation: fadeIn 0.8s ease;
}

.logo {
  width: 110px;
  height: auto;
  margin-bottom: 16px;
  border-radius: 12px;
}

h1 { font-size: 22px; font-weight: 600; margin: 0; }
h2 { font-size: 14px; font-weight: 300; margin: 6px 0 26px; color: var(--text-muted); }

.field { position: relative; margin-bottom: 18px; text-align: left; }

.field input {
  width: 100%;
  padding: 14px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  outline: none;
  background: rgba(0,0,0,0.35);
  color: #fff;
  border-radius: 12px;
  font-size: 16px; /* ✅ evita zoom en iOS */
}

.field label {
  position: absolute;
  top: 50%;
  left: 12px;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  transform: translateY(-50%);
  pointer-events: none;
  transition: 0.25s ease;
}

.field input:focus + label,
.field input:valid + label {
  top: -9px;
  left: 10px;
  background: rgba(0,0,0,0.85);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--gold1);
}

button {
  width: 100%;
  padding: 14px 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold1), var(--gold2));
  color: #000;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px; /* thumb-friendly */
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(255,204,0,0.35);
}

button:disabled { opacity: 0.75; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.25);
  border-top-color: rgba(0,0,0,0.85);
  display: none;
  animation: spin 0.8s linear infinite;
}

button.loading .btn-spinner { display: inline-block; }
button.loading .btn-text { opacity: 0.9; }

.msg {
  margin-top: 12px;
  min-height: 18px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  text-align: center;
}
.msg.error { color: var(--danger); }
.msg.success { color: var(--ok); }

.footer { margin-top: 22px; font-size: 11px; color: rgba(255,255,255,0.5); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ✅ Responsive extra */
@media (max-width: 360px) {
  .login-card { padding: 30px 18px; border-radius: 16px; }
  .logo { width: 96px; }
  h1 { font-size: 20px; }
  h2 { font-size: 13px; }
}

/* =========================================================
   Extra styles for App.js toast + loading (login page only)
   ========================================================= */

.hidden { display: none !important; }

#loading {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.70);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 2000;
}

#loading .spinner {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,0.18);
  border-top-color: rgba(255,255,255,0.70);
  animation: spin 0.9s linear infinite;
}

#loading .muted {
  color: #fff;
  font-weight: 600;
}

/* Toast */
.toast-area {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2500;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(10,10,10,0.85);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}

.toast .t { font-weight: 900; font-size: 13px; margin-bottom: 2px; }
.toast .m { color: rgba(255,255,255,0.80); font-size: 12px; }

.toast.ok { border-color: rgba(34,197,94,0.55); }
.toast.err { border-color: rgba(239,68,68,0.55); }
.toast.warn { border-color: rgba(245,158,11,0.55); }

@media (max-width: 480px) {
  .toast-area { right: 12px; left: 12px; bottom: 12px; }
  .toast { width: auto; min-width: unset; }
}
