/* ----------------- Enhanced Login Page Styles ----------------- */

/* Center the card nicely on the page */
body.login-page {
  min-height: 100vh;
  display: block; /* keep header flow intact */
}

/* Soft overlay for better text contrast on image backgrounds */
body.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15));
  pointer-events: none;
  z-index: 0;
}

/* ------------- Tabs -------------- */
.nav-pills {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 0 auto 22px auto;
  gap: 10px;
  padding: 6px;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
  backdrop-filter: blur(8px);
}

.nav-pills li {
  flex: 1;
  text-align: center;
}

.nav-link {
  display: block;
  padding: 12px 16px;
  border-radius: 10px;
  color: #0f2740;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.25s ease;
}

.nav-link:hover {
  background: rgba(15, 39, 64, 0.06);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #37bae2, #1487b3);
  box-shadow: 0 6px 18px rgba(20, 135, 179, 0.35);
}

/* ------------- Card -------------- */
.tab-content {
  position: relative;
  margin: 24px auto 48px auto;
  width: 100%;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 24px 48px rgba(16, 24, 40, 0.18);
  backdrop-filter: blur(12px);
  z-index: 1;
}

/* keep the blur effect subtle behind the content */
.tab-content::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

h2 {
  text-align: center;
  margin-bottom: 18px;
  color: #0f2740;
}

/* ------------- Social buttons -------------- */
.social-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.social-buttons button {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(15, 39, 64, 0.1);
  background: #ffffff;
  color: #0f2740;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.14);
}

.social-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.18);
}

/* Brand-ish hovers without external classes */
.social-buttons button:nth-child(1):hover { background: #1877f2; color: #fff; }
.social-buttons button:nth-child(2):hover { background: #db4437; color: #fff; }
.social-buttons button:nth-child(3):hover { background: #1da1f2; color: #fff; }
.social-buttons button:nth-child(4):hover { background: #333; color: #fff; }

/* ------------- Form -------------- */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-weight: 600;
  color: #0f2740;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #dbe6f4;
  background: #f8fbff;
  color: #0f2740;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-group input::placeholder { color: #7a8a9b; }

.form-group input:focus {
  border-color: #37bae2;
  box-shadow: 0 0 0 4px rgba(55, 186, 226, 0.18);
  background: #ffffff;
}

/* Role toggle pills */
.role-options {
  display: inline-flex;
  gap: 10px;
  background: #f3f7fb;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #e6eef7;
}

.role-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: #0f2740;
  user-select: none;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.role-options input { accent-color: #37bae2; }

.role-options input:checked + span,
.role-options input:checked ~ span { font-weight: 600; }

/* When input inside label is checked, style the label via :has if supported */
@supports(selector(:has(*))) {
  .role-options label:has(input:checked) {
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(16, 24, 40, 0.08);
  }
}

/* ------------- Helpers -------------- */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin: 12px 0 18px 0;
}

.form-options a {
  color: #1487b3;
  text-decoration: none;
}

.form-options a:hover { text-decoration: underline; }

/* ------------- Submit button -------------- */
.btn-submit {
  width: 100%;
  padding: 13px 16px;
  border: none;
  background: linear-gradient(135deg, #37bae2, #1487b3);
  color: white;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.3px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 10px 22px rgba(20, 135, 179, 0.28);
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(20, 135, 179, 0.34);
  filter: brightness(1.02);
}

.btn-submit:active { transform: translateY(0); }

/* ------------- Utilities -------------- */
.text-center { text-align: center; margin-top: 15px; }

/* ------------- Error and Success Messages -------------- */
.error-message {
  color: #dc3545;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.error-message.show {
  display: block;
}

.success-message {
  color: #28a745;
  font-size: 14px;
  margin-top: 12px;
  padding: 8px 12px;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  text-align: center;
}

.success-message.show {
  display: block;
}

/* Form validation states */
.form-group input.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.18);
}

.form-group input.success {
  border-color: #28a745;
  box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.18);
}

/* Loading state for forms */
.form.loading .btn-submit {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.form.loading .btn-submit::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .nav-pills { max-width: 92%; }
  .tab-content { margin: 18px 16px 36px 16px; padding: 22px; }
}