/* ═══ TOKENS ═══ */
:root {
  --accent-primary: #ee5100;
  --accent-secondary: #d2691e;
  --accent-gradient: linear-gradient(135deg, #ee5100, #d2691e);
  --accent-gradient-hover: linear-gradient(135deg, #d2691e, #ee5100);
  --error-color: #ef4444;
  --success-color: #38761d;
  --text-main: #222222;
  --text-muted: #666666;
  --input-bg: #ffffff;
  --input-bg-hover: #fcfcfc;
  --border-focus: rgba(238, 81, 0, 0.6);
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

/* ═══ RESET ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ═══ VIP LIGHT ORANGE BODY ═══ */
body {
  font-family: var(--font-family);
  min-height: 100vh;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: #f7f7f7;
  color: var(--text-main);
}

/* Header Gradient */
body::before {
  content: "";
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: 35vh;
  background: linear-gradient(180deg, #8b4513 0%, #d2691e 80%, #f7f7f7 100%);
  z-index: 0;
}

/* ═══ CONTAINER (flat cinematic — no card chrome) ═══ */
.login-container {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 420px;
  animation: fadeIn 0.9s ease forwards;
}

/* Strip card chrome */
.glass-card {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  overflow: visible;
}

/* ═══ HEADER / LOGO ═══ */
.header {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  background: #ffffff;
  padding: 5px 14px;
  border-radius: 50px;
  border: 1px solid #eaeaea;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.flag-icon { font-size: 1.1rem; }
.logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 1px;
  color: #ffffff;
  display: inline-block;
  animation: logoPulse 2.8s ease-in-out infinite;
}

@keyframes logoPulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.06); filter: drop-shadow(0 0 6px rgba(255,209,102,0.5)); }
}

.accent-text {
  color: #FFD166;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255,209,102,0.7);
}

.header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
  color: var(--text-main);
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ═══ INPUT GROUPS ═══ */
.input-group {
  margin-bottom: 16px;
  position: relative;
}

/* Hide labels — placeholders carry context */
.input-group label { display: none; }

/* ═══ PILL WRAPPERS ═══ */
.phone-input-wrapper,
.password-wrapper {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  padding: 0 18px;
  border-radius: 40px;
  transition: var(--transition-smooth);
  border: 1px solid #eaeaea;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  overflow: hidden;
}

.phone-input-wrapper:hover,
.password-wrapper:hover { background: var(--input-bg-hover); }

.phone-input-wrapper:focus-within,
.password-wrapper:focus-within {
  background: var(--input-bg-hover);
  box-shadow: 0 0 10px rgba(238,81,0,0.2);
  border-color: var(--accent-primary);
}

/* Country code */
.country-code {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Country picker button */
.country-picker-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 14px 10px 14px 0;
  border-right: 1px solid #eaeaea;
  margin-right: 10px;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.country-picker-btn:hover { opacity: 0.75; }
.country-picker-btn:active { opacity: 0.55; }

.country-flag-img {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  flex-shrink: 0;
  display: inline-block;
}

.cp-chevron {
  color: #999;
  flex-shrink: 0;
}

/* Inputs inside pills */
.phone-input-wrapper input,
.password-wrapper input {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 500;
  padding: 16px 12px;
  outline: none;
  width: 100%;
}

.phone-input-wrapper input::placeholder,
.password-wrapper input::placeholder {
  color: #999;
  font-weight: 400;
}

.phone-input-wrapper input[type="tel"] {
  border: none;
  padding-left: 0;
}
.phone-input-wrapper input[type="tel"]:focus { box-shadow: none; }

/* ═══ PASSWORD EYE TOGGLE ═══ */
.password-wrapper { padding-right: 14px; }

.toggle-password {
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 8px 4px 8px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--accent-primary);
}
.toggle-password:hover { color: var(--text-main); }
.eye-icon { width: 18px; height: 18px; }

/* ═══ VALIDATION MESSAGES ═══ */
.validation-message {
  font-size: 0.7rem;
  color: var(--error-color);
  margin-top: 4px;
  padding-left: 18px;
  display: block;
  min-height: 12px;
  opacity: 0;
  transform: translateY(-3px);
  transition: all 0.2s ease-out;
}
.validation-message.visible { opacity: 1; transform: translateY(0); }

/* ═══ FORGOT PASSWORD ROW ═══ */
.forgot-row {
  text-align: right;
  margin-bottom: 20px;
  margin-top: -6px;
  padding-right: 6px;
}

.forgot-link {
  font-size: 0.8rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}
.forgot-link:hover { text-decoration: underline; color: #7fdfff; }

/* ═══ SUBMIT BUTTON ═══ */
.submit-btn {
  margin-top: 8px;
  width: 100%;
  padding: 16px;
  border-radius: 50px;
  border: none;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  background: var(--accent-gradient);
  box-shadow: 0 10px 30px rgba(72, 198, 239, 0.4);
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(72, 198, 239, 0.6);
  background: var(--accent-gradient-hover);
}
.submit-btn:active { transform: translateY(0); }
.submit-btn:disabled {
  background: #eaeaea !important;
  color: #999 !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

/* ═══ SPINNER ═══ */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(238,81,0,0.3);
  border-radius: 50%;
  border-top-color: #ee5100;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
.spinner.hidden { display: none; }

/* ═══ FEEDBACK TOAST ═══ */
.feedback-toast {
  padding: 10px 16px;
  border-radius: 40px;
  font-size: 0.82rem;
  margin-top: 12px;
  text-align: center;
  animation: fadeIn 0.3s ease-out;
  border: 1px solid transparent;
}
.feedback-toast.success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success-color);
  border-color: rgba(16, 185, 129, 0.25);
}
.feedback-toast.error {
  background: rgba(239, 68, 68, 0.12);
  color: var(--error-color);
  border-color: rgba(239, 68, 68, 0.25);
}
.feedback-toast.hidden { display: none; }

/* ═══ SIGNUP REDIRECT ═══ */
.signup-redirect {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.signup-redirect a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}
.signup-redirect a:hover { text-decoration: underline; }

/* ═══ FORGOT PASSWORD MODAL ═══ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}
.modal-overlay.hidden { display: none; }

.modal-card {
  background: #ffffff;
  border: none;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  animation: fadeIn 0.3s ease-out;
}

.modal-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.modal-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 4px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-cancel {
  flex: 1;
  padding: 10px;
  border-radius: 40px;
  border: 1px solid #ccc;
  background: #fdfdfd;
  color: #666;
  font-family: var(--font-family);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.modal-cancel:hover { border-color: var(--text-muted); color: var(--text-main); }

.modal-submit {
  flex: 1;
  padding: 10px;
  border-radius: 40px;
  border: none;
  background: var(--accent-gradient);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 6px 18px rgba(72, 198, 239, 0.3);
}
.modal-submit:hover { opacity: 0.88; }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 480px) {
  .login-container { width: 92%; }
  input[type="tel"],
  input[type="password"] { font-size: 16px; }
}
