* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #511713, #74211b, #8b2d23);
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.logo img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

h2 {
  text-align: center;
  color: #511713;
  font-size: 24px;
  margin-bottom: 4px;
}

.subtitle {
  text-align: center;
  color: #777;
  font-size: 13px;
  margin-bottom: 18px;
}

.input-box {
  margin-bottom: 12px;
}

.input-box input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: 0.3s;
}

.input-box input:focus {
  outline: none;
  border-color: #511713;
  box-shadow: 0 0 0 3px rgba(81, 23, 19, 0.12);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 18px;
}

.row label {
  color: #555;
}

.row a {
  color: #511713;
  text-decoration: none;
  font-weight: 500;
}

.row a:hover {
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  padding: 11px;
  background: #511713;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.login-btn:hover {
  background: #6b1f1a;
  transform: translateY(-2px);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0 16px;
  color: #999;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #ddd;
}

.divider span {
  padding: 0 12px;
}

.register-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 11px;
  border: 2px solid #ecc61a;
  border-radius: 8px;
  color: #511713;
  background: #ecc61a;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: 0.3s;
  box-sizing: border-box;
}

.register-btn:hover {
  color: #fff;
  cursor: pointer;
  background: #d4b010;
  border-color: #d4b010;
}

.footer {
  text-align: center;
  margin-top: 16px;
  color: #999;
  font-size: 12px;
}

/* Alert Notification Styles */
.alert {
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 15px;
  text-align: center;
  display: none;
}

.alert-danger {
  background: #ffe5e5;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

/* OTP Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
  padding: 1rem;
  z-index: 1000;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #fff;
  padding: 24px;
  border-radius: 18px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal h3 {
  color: #511713;
  font-size: 20px;
  margin-bottom: 4px;
}

.otp-inputs {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 18px 0;
}

.otp-field {
  width: 40px;
  height: 48px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  color: #511713;
  transition: 0.3s;
}

.otp-field:focus {
  outline: none;
  border-color: #511713;
  box-shadow: 0 0 0 3px rgba(81, 23, 19, 0.12);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.btn-link {
  background: none;
  border: none;
  color: #511713;
  cursor: pointer;
  text-decoration: underline;
  font-size: 13px;
  font-weight: 500;
}

.btn-link:hover {
  color: #74211b;
}

.btn-cancel {
  color: #777;
  text-decoration: none;
}

.btn-cancel:hover {
  color: #333;
}

/* Responsive Styles */
@media (max-width: 768px) {
  body {
    overflow-y: auto;
    padding: 15px;
  }

  .login-box,
  .modal {
    max-width: 330px;
    padding: 22px;
  }

  .logo img {
    width: 65px;
    height: 65px;
  }

  h2 {
    font-size: 22px;
  }

  .subtitle {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  body {
    overflow-y: auto;
    padding: 12px;
  }

  .login-box,
  .modal {
    max-width: 100%;
    padding: 20px;
  }

  .logo img {
    width: 60px;
    height: 60px;
  }

  h2 {
    font-size: 20px;
  }

  .input-box input,
  .login-btn,
  .register-btn {
    font-size: 14px;
  }

  .otp-field {
    width: 35px;
    height: 44px;
    font-size: 16px;
  }
}