/* General reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", Arial, sans-serif;
}

body {
  background: #fff;
  color: #111;
}

/* Top bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo img {
  width: 150px;
  height: 40px;
}

.logo-text {
  font-size: 20px;
  font-weight: bold;
  color: #0077ff;
}

.nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #0077ff;
  font-weight: 500;
}

.signup-btn {
  background: #0077ff;
  color: #fff !important;
  padding: 16px 24px;
  border-radius: 25px;
}

/* Container */
.container {
  max-width: 450px;
  margin: 50px auto;
  text-align: left;
  padding: 0px 1rem;
}

.container h1 {
  font-size: 32px;
  margin-bottom: 20px;
  font-weight: 600;
  color: #002338;
}

.container p {
  font-size: 15px;
  color: #444;
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Input with animated placeholder */
.login-form input {
  width: 100%;
  padding: 23px;
  border: 1px solid #ddd;
  background-color: #f9f9f9;
  border-radius: 14px;
  font-size: 15px;
  outline: none;
  margin-bottom: .9rem;
  position: relative;
}

/* Normal placeholder */
.login-form input::placeholder {
  color: #999;
  font-size: 15px;
  transition: 0.2s ease all;
}

/* Focused placeholder */
.login-form input:focus::placeholder {
  transform: translateY(-12px);
  font-size: 12px;
  color: #999;
}

/* Password field */
.password-field {
  position: relative;
}

.toggle-eye {
  position: absolute;
  right: 12px;
  top: 40%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 30px;
  color: #9E9E9E;
}

/* Secure message */
.secure-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #48484894;
  background: #fff;
  border: 1px solid #eee;
  padding: 20px 14px;
  margin-top: .5rem;
  border-radius: 6px;
}

/* Buttons */
.signin-btn {
  background: #6cc6ff;
  color: #fff;
  border: none;
  padding: 16px 24px;
  border-radius: 25px;
  font-size: 15px;
  cursor: pointer;
  font-weight: 500;
  text-align: center;
}

.passkey-btn {
  background: #eee;
  color: #333;
  border: none;
  padding: 16px 24px;
  border-radius: 25px;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
}

.reset-link {
  display: block;
  margin-top: 20px;
  font-size: 14px;
  color: #0077ff;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
}

/* Checkbox row */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #333;
}

.checkbox-row input {
  width: 20px;
  height: 20px;
  cursor: pointer;
  margin-top: .8rem;
}

/* Links row (FAQ, Resend code, Call me) */
.links-row {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.links-row a {
  font-size: 14px;
  color: #0077ff;
  text-decoration: none;
  font-weight: 600;
}

/* ================== EXTRA ADDED STYLES ================== */

/* Error message */
.error-msg {
  color: #c53621;
  font-size: 12px;
  padding: 0rem 0.5rem;
  margin-top: 5px;
  display: none;
}

/* Sign in button with spinner */
.signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Eye toggle smaller for better balance */
.toggle-eye {
  font-size: 22px;
  top: 50%;
}

/* Hide the small header by default */
.topbar-sm {
  display: none;
}

/* Show small header & hide default header at 768px and below */
@media (max-width: 768px) {
  .topbar {
    display: none; /* hide original */
  }

  .topbar-sm {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 20px;
  }

  .fr-link {
    justify-self: start;
    font-weight: 500;
    color: #0077ff;
    text-decoration: none;
  }

  .logo-sm {
    justify-self: center;
  }

  .logo-sm img {
    width: 30px;
    height: auto;
  }

  .signup-btn-sm {
    justify-self: end;
    background: #0077ff;
    color: #fff;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 500;
    text-decoration: none;
  }
}
