/* === Login page styles === */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0a0e1a;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-container {
  width: 100%;
  max-width: 380px;
}

.login-card {
  background: #141925;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin-bottom: 1rem;
  object-fit: contain;
}

.login-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: #fff;
}

.login-tagline {
  font-size: 0.8125rem;
  color: #8a94a6;
  margin-bottom: 1.5rem;
}

/* === Form === */

.login-form {
  text-align: left;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0d1117;
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: #3b82f6;
}

.form-group input::placeholder {
  color: #4b5563;
}

/* Eye/eye-off toggle on a password field. Both icons stay in the DOM; a class on
   the button toggles which is shown — same idiom as the dashboard's theme icons,
   just with inline SVG here since this page doesn't load Lucide. */
.password-field {
  position: relative;
}

.password-field input {
  padding-right: 2.75rem;
}

.password-toggle-btn {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
}

.password-toggle-btn:hover {
  color: #e0e0e0;
}

.password-toggle-btn .icon-hidden {
  display: none;
}

.password-toggle-btn.is-visible .icon-visible {
  display: none;
}

.password-toggle-btn.is-visible .icon-hidden {
  display: block;
}

/* === Buttons === */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #3b82f6;
  color: #fff;
  margin-top: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
  background: #2563eb;
}

.btn-passkey {
  background: #1f2937;
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-passkey:hover:not(:disabled) {
  background: #374151;
}

/* === Divider === */

.divider {
  display: flex;
  align-items: center;
  margin: 1.25rem 0;
  color: #6b7280;
  font-size: 0.8rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.divider span {
  padding: 0 0.75rem;
}

/* === Messages === */

.login-error {
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  background: rgba(220, 38, 38, 0.1);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.login-success {
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* === Text links (forgot password / back to sign in) === */

.btn-link {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
}

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