/* =========================
   GLOBAL
========================= */
* {
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

body {
  margin: 0;
  padding: 0;

  background: radial-gradient(circle at top left, #7c3aed, transparent 40%),
              radial-gradient(circle at bottom right, #2563eb, transparent 40%),
              #0f172a;

  display: flex;
  justify-content: center;
  align-items: center;

  min-height: 100vh;
}

/* =========================
   LOGO & TEXT
========================= */
.logo img {
  width: 65px;
  height: 65px;
  margin-bottom: 10px;
  filter: drop-shadow(0 6px 15px rgba(0,0,0,0.25));
}

.tagline {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 10px;
}

.subtext {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
}

/* =========================
   FORM CONTAINER
========================= */
.form-container.modern {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);

  padding: 35px 28px;
  border-radius: 18px;

  box-shadow:
    0 20px 60px rgba(0,0,0,0.3),
    0 0 0 1px rgba(255,255,255,0.2) inset;

  width: 100%;
  max-width: 380px;
  text-align: center;
  margin: 35px 28px;
  animation: fadeInUp 0.7s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(-25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-container h2 {
  margin-bottom: 10px;
  color: #111827;
}

/* =========================
   FORM ROW (FIXED)
========================= */
.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

/* REMOVED THIS BLOCK (this was causing stacking)
@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
  }
}
*/

/* =========================
   INPUT GROUP
========================= */
.form-group {
  position: relative;
  margin-bottom: 18px;
}

/* =========================
   ICON
========================= */
.form-group .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);

  font-size: 14px;
  color: #9ca3af;

  z-index: 2;
  pointer-events: none;
  transition: 0.2s;
}

/* =========================
   INPUT
========================= */
.form-group input {
  width: 100%;
  padding: 12px 12px 12px 40px;

  border: 1px solid #e5e7eb;
  border-radius: 10px;

  font-size: 14px;
  background: #f9fafb;

  position: relative;
  z-index: 1;

  transition: all 0.25s ease;
}

.form-group input:focus {
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
  outline: none;
}

/* Icon color on focus */
.form-group input:focus ~ .icon {
  color: #6366f1;
}

/* =========================
   FLOATING LABEL
========================= */
.form-group label {
  position: absolute;
  left: 40px;
  top: 12px;

  font-size: 14px;
  color: #9ca3af;

  pointer-events: none;
  transition: all 0.2s ease;

  background: transparent;
  z-index: 2;
}

.form-group input:focus + label,
.form-group input.filled + label {
  top: -8px;
  font-size: 11px;
  color: #6366f1;
  background: #fff;
  padding: 0 4px;
}

/* =========================
   PASSWORD TOGGLE
========================= */
.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);

  cursor: pointer;
  color: #9ca3af;

  z-index: 3;
  transition: 0.2s;
}

.toggle-password:hover {
  color: #6366f1;
}

/* =========================
   VALIDATION
========================= */
.error {
  color: red;
  font-size: 13px;
  margin-top: 5px;
}

.password-strength {
  font-size: 13px;
  margin-top: 5px;
}

/* Password strength colors */
.password-weak { color:#dc2626; font-weight:600; }
.password-medium { color:#facc15; font-weight:600; }
.password-strong { color:#22c55e; font-weight:600; }

/* =========================
   BUTTON
========================= */
.submit-btn {
  width: 100%;
  padding: 14px;
  background: #2575fc;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}

.submit-btn:hover {
  background: #1a5bd8;
  transform: scale(1.03);
}

/* =========================
   LINKS
========================= */
.login-link {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
}

.login-link a {
  color: #2575fc;
  text-decoration: none;
}

.login-link a:hover {
  text-decoration: underline;
}

.help-links {
  text-align: right;
  margin-top: -10px;
  margin-bottom: 10px;
}

.forgot-link {
  font-size: 13px;
  color: #2575fc;
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

/* =========================
   TOAST
========================= */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 100;
  font-size: 14px;
}

#toast.show {
  opacity: 1;
  pointer-events: auto;
}
