/* ══════════════════════════════════════════════════════
   LOGIN.CSS — Fully Theme-Aware (themeEngine.js v2.1)
   Uses CSS variables injected by DelightTheme.injectCSS()
   ══════════════════════════════════════════════════════ */

* { box-sizing: border-box; }

body {
  background: var(--bg, #f2f2f7) !important;
  color: var(--text-dark, #1a1a2e) !important;
  border: 10px solid var(--primary, #ff6b00);
  border-radius: 20px;
  padding: 20px;
  margin: 15px;
  padding-bottom: 28px;
  animation: borderPulse 2s infinite;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

@keyframes borderPulse {
  0%   { border-color: var(--primary, #ff5500); }
  33%  { border-color: var(--primary-dark, #e05a00); }
  66%  { border-color: var(--accent-orange, #ff9500); }
  100% { border-color: var(--primary, #ff5500); }
}

/* ── WELCOME HEADER ── */
.delight {
  font-size: small;
  color: var(--primary, #ff6b00);
  text-shadow: 2px 5px #d0d0d0;
  margin: 10px;
  margin-bottom: 50px;
  border-radius: 20px;
  animation: fadeInUp 1s ease-out, colorCycle 3s infinite;
  transition: color 0.3s;
}
.delight h1, .delight h2 {
  color: var(--primary, #ff6b00);
  transition: color 0.3s;
}
@keyframes colorCycle {
  0%   { color: var(--primary, #ff6b00); }
  50%  { color: var(--accent-orange, #ff9500); }
  100% { color: var(--primary, #ff6b00); }
}

/* ── STORE LOGO ── */
.store-info {
  text-align: center;
  margin-bottom: 15px;
  animation: bounceIn 1s ease-out 0.3s both;
}
.store-info img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary, #ff6b00);
  animation: pulseGlow 2s infinite;
  transition: border-color 0.3s;
}
.store-info h4 {
  color: var(--primary, #ff6b00);
  margin: 10px 0 0 0;
  font-size: 22px;
  transition: color 0.3s;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px var(--primary-glow, rgba(255,107,0,0.3)); }
  50%       { box-shadow: 0 0 25px var(--primary-glow, rgba(255,107,0,0.6)); }
}

/* ── FORM CARD ── */
.login {
  border: 3px solid var(--primary, #ff6b00);
  border-radius: 20px;
  margin: 0;
  background-color: var(--card-bg, #fafafa) !important;
  color: var(--text-dark, #1a1a2e) !important;
  padding: 5px 25px 25px 25px;
  animation: fadeInUp 1s ease-out 0.5s both;
  transition: border-color 0.3s, background 0.3s;
}
.login h3 {
  text-align: center;
  color: var(--primary, #ff6b00);
  animation: slideIn 0.8s ease-out 0.7s both;
  transition: color 0.3s;
}
.login form { animation: fadeIn 1s ease-out 0.9s both; }

/* ── INPUTS ── */
#name,
.login input[type="text"],
.login input[type="number"],
.login input[type="password"] {
  width: 100%;
  height: 38px;
  margin-top: 4px;
  margin-bottom: 12px;
  border: 1.5px solid var(--border, #e8e8f0);
  border-radius: 8px;
  font-size: 14px;
  padding: 10px;
  background: var(--bg, #f2f2f7) !important;
  color: var(--text-dark, #1a1a2e) !important;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.3s, color 0.3s;
}
#name::placeholder,
.login input::placeholder {
  color: var(--text-light, #aaa) !important;
}
#name:focus,
.login input[type="text"]:focus,
.login input[type="number"]:focus,
.login input[type="password"]:focus {
  border-color: var(--primary, #ff6b00) !important;
  box-shadow: 0 0 0 3px var(--primary-glow, rgba(255,107,0,0.18)) !important;
  background: var(--card-bg, #fff) !important;
}

/* ── PASSWORD WRAPPER ── */
.password-wrapper {
  position: relative;
  display: block;
  width: 100%;
}
.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
  width: 100%;
  height: 38px;
  margin-top: 4px;
  margin-bottom: 12px;
  border: 1.5px solid var(--border, #e8e8f0);
  border-radius: 8px;
  font-size: 14px;
  padding: 10px;
  padding-right: 9px;
  background: var(--bg, #f2f2f7) !important;
  color: var(--text-dark, #1a1a2e) !important;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.password-wrapper input:focus {
  border-color: var(--primary, #ff6b00) !important;
  box-shadow: 0 0 0 3px var(--primary-glow, rgba(255,107,0,0.18)) !important;
}
.toggle-password {
  position: absolute;
  right: 10%;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 20px;
  height: 20px;
  color: var(--primary, #ff6b00);
  transition: color 0.3s;
}
.toggle-password svg { width: 18px; height: 18px; }

/* ── SUBMIT BUTTON ── */
.submit-btn {
  border: none;
  border-radius: 20px;
  width: 150px;
  height: 38px;
  margin-bottom: 10px;
  color: #fff !important;
  font-weight: bold;
  background: var(--primary, #ff6b00) !important;
  background: linear-gradient(45deg, var(--primary, #ff5500), var(--accent-orange, #ff9500)) !important;
  cursor: pointer;
  animation: pulse 2s infinite 1.5s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  transition: opacity 0.2s, transform 0.2s, background 0.3s;
  box-shadow: 0 4px 14px var(--primary-glow, rgba(255,107,0,0.35));
}
.submit-btn:hover   { transform: translateY(-1px); opacity: 0.92; }
.submit-btn:active  { transform: scale(0.97); }
.submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  animation: none;
  transform: none;
}

.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ── LINK (Signup / Login) ── */
a#signupLink, a#loginLink {
  color: var(--primary, #ff6b00) !important;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.3); }
  50%  { transform: scale(1.05); }
  70%  { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TOAST ── */
#toastContainer {
  position: fixed;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: 70%;
  max-width: 340px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(-14px) scale(0.96);
  transition: opacity 0.3s ease, transform 0.3s ease;
  width: 100%;
  pointer-events: auto;
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast-error   { background: linear-gradient(135deg, #e53935, #ef5350); }
.toast-success { background: linear-gradient(135deg, #2e7d32, #43a047); }
.toast-info    { background: linear-gradient(135deg, #1565c0, #1e88e5); }
.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-msg  { line-height: 1.4; }