/* ============================================================
   login.css  –  Styles specific to the Login page (index.html)
   ============================================================ */

/* === FORM GROUP === */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* === INPUT === */
.input-wrap {
  position: relative;
}
.input-wrap .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s;
  width: 16px;
  text-align: center;
}
.input-wrap input:focus ~ .icon {
  color: var(--accent);
}
.input-wrap input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px 13px 42px;
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    background 0.2s;
  outline: none;
}
.input-wrap input:focus {
  border-color: var(--accent);
  background: #1a1a28;
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.12);
}
.input-wrap input.error-input {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(255, 77, 109, 0.1);
}

/* === TOGGLE PASSWORD BUTTON === */
.toggle-pass {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  width: 20px;
  text-align: center;
  transition: color 0.2s;
}
.toggle-pass:hover {
  color: var(--text);
}

/* === ERROR MESSAGE === */
.error-msg {
  display: none;
  color: var(--error);
  font-size: 0.78rem;
  margin-top: 6px;
  padding-left: 4px;
  animation: shake 0.3s ease;
}
.error-msg.show {
  display: block;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

/* === SUBMIT BUTTON === */
.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  font-family: "Syne", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #9b64ff);
  color: #fff;
  box-shadow: 0 8px 24px rgba(108, 99, 255, 0.35);
  margin-top: 8px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(108, 99, 255, 0.5);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #fff2, transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-primary:hover::after {
  opacity: 1;
}

.btn-loading {
  pointer-events: none;
  opacity: 0.8;
}
.btn-loading::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* === DIVIDER === */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* === SWITCH LINK === */
.switch-link {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.switch-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.switch-link a:hover {
  color: var(--accent2);
}
