/* ===== RESET ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
}

/* ===== DESIGN SYSTEM ===== */
:root {
  --border: rgba(255, 255, 255, 0.25);
  --focus: #6366f1;
  --glow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

/* ===== AUTOFILL FIX ===== */
input:-webkit-autofill,
input:-webkit-autofill:focus,
input:-webkit-autofill:hover {
  -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
  box-shadow: 0 0 0 1000px transparent inset !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid var(--border) !important;
}

/* ===== BACKGROUND ===== */
.login-bg {
  min-height: 100vh;
  background:
    linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.6)),
    url("../images/loginbg.jpg") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ===== CARD ===== */
.login-card {
  width: 100%;
  max-width: 380px;
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

/* ===== TEXT ===== */
.login-card h1 {
  font-size: 30px;
  margin-bottom: 8px;
  color: white;
}

.subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 25px;
}

.login-logo {
  width: 100px !important;
  margin-bottom: 25px;
}

/* ===== FORM ===== */
form {
  text-align: left;
}

label {
  font-size: 13px;
  color: #eee;
  margin-bottom: 6px;
  display: block;
}

/* ===== INPUT ===== */
input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: white;
  font-size: 14px;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* ===== UNIFIED FOCUS ===== */
input:focus,
.otp-box:focus,
.phone-input-wrapper:focus-within {
  border-color: var(--focus);
  box-shadow: var(--glow);
  outline: none;
}

/* ===== PHONE INPUT (FINAL FIX) ===== */
.phone-input-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  margin-bottom: 18px;
  gap: 6px;
}

/* +91 */
.country-code {
  padding: 0 12px;
  color: #ccc;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 14px;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

/* 🔥 MAIN FIX (IMPORTANT) */
.phone-input-wrapper input {
  width: auto !important;
  /* FIX */
  flex: 1;
  border: none !important;
  box-shadow: none !important;
  background: transparent;
  margin: 0;
  padding: 12px;
}

/* ===== BUTTON ===== */
button {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35);
}

/* ===== OTP ===== */
.otp-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 20px;
}

.otp-box {
  width: 45px;
  height: 50px;
  text-align: center;
  font-size: 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: white;
}

/* ===== TOAST ===== */
.top-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);

  display: inline-block;
  width: fit-content;
  /* 🔥 main fix */
  max-width: calc(100% - 40px);
  /* side spacing */

  padding: 12px 16px;

  border-radius: 999px;
  /* pill style (better look) */

  white-space: nowrap;
  /* short msg ek line */

  background: rgba(0, 0, 0, 0.85);
  color: white;
  font-size: 14px;

  opacity: 0;
  transition: 0.4s;
  z-index: 9999;
}

.top-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== MOBILE ===== */
@media (max-width: 480px) {

  .login-card {
    padding: 25px 16px;
    border-radius: 16px;
  }

  .login-card h1 {
    font-size: 24px;
  }

  .subtitle {
    font-size: 11px;
  }

  .phone-input-wrapper input {
    padding: 10px;
    font-size: 13px;
  }

  .country-code {
    font-size: 13px;
    padding: 0 10px;
  }

  .otp-wrapper {
    gap: 2px;
  }

  .otp-box {
    width: 38px;
    height: 45px;
    font-size: 16px;
  }

  button {
    padding: 12px;
    font-size: 13px;
  }
}