html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(30, 64, 175, 0.25);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #faf8ff;
  color: #131b2e;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header customization */
.navbar-dark.bg-dark {
  background-color: #1a253c !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.text-gradient {
  background: linear-gradient(135deg, #2f65f6 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Authentication Layout */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: 3rem 0;
  position: relative;
}

.auth-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 64, 175, 0.08) 0%, rgba(250, 248, 255, 0) 70%);
  z-index: 0;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.auth-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(19, 27, 46, 0.05), 0 1px 8px rgba(19, 27, 46, 0.02);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 480px;
  border: 1px solid #e2e8f0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  z-index: 1;
}

.auth-card.broad-card {
  max-width: 650px;
}

.auth-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(19, 27, 46, 0.08), 0 3px 12px rgba(19, 27, 46, 0.03);
}

.auth-title {
  font-weight: 700;
  color: #131b2e;
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  color: #505f76;
  text-align: center;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.auth-form .form-label {
  font-weight: 600;
  font-size: 0.8rem;
  color: #505f76;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

/* Custom Input Field with Icon - Unified Border Container */
.input-group-custom {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background-color: #faf8ff;
  transition: all 0.25s ease;
  width: 100%;
}

.input-group-custom:focus-within {
  border-color: #2f65f6;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(47, 101, 246, 0.15);
}

.input-group-custom .material-symbols-outlined {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #757684;
  pointer-events: none;
  font-size: 20px;
}

.input-group-custom .password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #757684;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 20px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.input-group-custom .password-toggle:hover {
  color: #131b2e;
}

.auth-input {
  border: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 8px;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: 0.95rem;
  color: #131b2e;
  width: 100%;
  height: auto;
}

.input-group-custom:has(.password-toggle) .auth-input {
  padding-right: 2.75rem;
}

.auth-input::placeholder {
  color: rgba(19, 27, 46, 0.4);
}

.auth-card.broad-card .auth-input {
  padding-left: 1rem;
}

.auth-card.broad-card .input-group-custom .auth-input {
  padding-left: 2.75rem;
}

/* Action Buttons & Bootstrap Primary Overrides */
.btn-primary, .auth-btn {
  background-color: #2f65f6 !important;
  border-color: #2f65f6 !important;
  color: #ffffff !important;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .auth-btn:hover {
  background-color: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(47, 101, 246, 0.2) !important;
}

.auth-btn {
  border: none;
  padding: 0.75rem 1.5rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.auth-btn:active {
  transform: scale(0.98);
}

.auth-btn-outline {
  border: 1.5px solid #e2e8f0;
  background-color: transparent;
  color: #131b2e;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: all 0.25s ease;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.auth-btn-outline:hover {
  background-color: #f2f3ff;
  border-color: #c4c5d5;
  color: #131b2e;
}

.auth-btn-outline:active {
  transform: scale(0.98);
}

/* Separator Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: #757684;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1.5px solid #e2e8f0;
}

.divider span {
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-footer {
  font-size: 0.9rem;
  color: #505f76;
}

.auth-footer a {
  color: #2f65f6;
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.forgot-password-link {
  font-size: 0.8rem;
  color: #2f65f6;
  text-decoration: none;
  font-weight: 600;
}

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

.otp-input-field {
  letter-spacing: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  padding-left: 1rem !important; /* overrides standard input padding for OTP alignment */
}

/* Profile Menu Dropdown (Vertical) */
.profile-menu-container {
  position: relative;
  display: inline-block;
}

.profile-menu-trigger {
  background: none;
  border: none;
  color: #faf8ff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.profile-menu-trigger:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.profile-menu-trigger .material-symbols-outlined {
  font-size: 28px;
}

.profile-dropdown-vertical {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 12px;
  background-color: #131b2e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  flex-direction: column;
  gap: 12px;
  z-index: 1050;
  width: 260px;
  animation: slideInVertical 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.profile-dropdown-vertical.active {
  display: flex;
}

.profile-dropdown-vertical .user-info-section {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-dropdown-vertical .user-email {
  color: #faf8ff;
  font-size: 0.85rem;
  font-weight: 600;
  word-break: break-all;
}

.profile-dropdown-vertical .user-role {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #38bdf8;
  border-radius: 4px;
  align-self: flex-start;
}

.profile-dropdown-vertical .dropdown-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  background: none;
  border: none;
  text-align: left;
}

.profile-dropdown-vertical .dropdown-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #faf8ff;
}

.profile-dropdown-vertical .dropdown-action-btn.logout-btn {
  color: #ef4444;
}

.profile-dropdown-vertical .dropdown-action-btn.logout-btn:hover {
  background-color: rgba(239, 68, 68, 0.08);
  color: #f87171;
}

@keyframes slideInVertical {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}