.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  /* Solid overlay with subtle blue tint */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.auth-overlay.active {
  display: flex;
}

.auth-modal {
  width: 95%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-overlay.active .auth-modal {
  transform: scale(1);
}

.profile-modal {
  max-width: 920px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 10px 0;
}

.profile-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-col:last-child {
  border-left: 1px dashed #e2e8f0;
  padding-left: 24px;
}

.form-row-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 30px;
  border-bottom: 1px solid #f1f5f9;
}

.auth-modal-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-close-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: none;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s;
}

.auth-close-btn:hover {
  background: #f1f5f9;
  color: #ef4444;
  transform: rotate(90deg);
}

.auth-modal-body {
  padding: 24px 30px 30px;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 12px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border-radius: 9px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: #64748b;
  transition: all 0.2s;
}

.auth-tab.active {
  background: #ffffff;
  color: #C1181D;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-form-group {
  margin-bottom: 18px;
}

.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .auth-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.auth-form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 13px;
  color: #334155;
}

.auth-form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  outline: none;
  font-size: 14px;
  transition: all 0.3s;
  color: #1e293b;
}

.auth-form-input:focus {
  background: #ffffff;
  border-color: #C1181D;
  box-shadow: 0 0 0 4px rgba(193, 24, 29, 0.1);
}

.auth-form-input::placeholder {
  color: #94a3b8;
}

.auth-form-input.error {
  border-color: #ef4444;
  background: #fffafb;
}

.auth-error-message {
  display: none;
  color: #ef4444;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
}

.auth-error-message.show {
  display: block;
}

.auth-error-message.show {
  display: block;
}

.auth-password-wrapper {
  position: relative;
}

.auth-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 5px;
  font-size: 16px;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #C1181D 0%, #9A0007 100%);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 15px -3px rgba(193, 24, 29, 0.2);
  transition: all 0.3s;
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 20px -5px rgba(193, 24, 29, 0.3);
  filter: brightness(110%);
}

.auth-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.auth-actions .auth-submit-btn {
  width: auto;
  min-width: 180px;
}

.auth-danger-btn {
  padding: 12px 24px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
}

.auth-danger-btn:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fee2e2;
}

.auth-footer {
  margin-top: 20px;
  font-size: 14px;
  text-align: center;
  color: #64748b;
}

.auth-link {
  color: #C1181D;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.password-strength {
  display: none;
  margin-top: 10px;
}

.password-strength.show {
  display: block;
}

.password-strength-bar {
  width: 100%;
  height: 5px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.password-strength-fill {
  height: 100%;
  width: 33%;
  transition: all 0.3s;
}

.password-strength-fill.weak {
  background: #ef4444;
}

.password-strength-fill.medium {
  background: #f59e0b;
  width: 66%;
}

.password-strength-fill.strong {
  background: #10b981;
  width: 100%;
}

.password-strength-text {
  font-size: 11px;
  margin-top: 5px;
  font-weight: 600;
  color: #64748b;
}

@media (max-width: 768px) {
  .profile-modal {
    overflow-y: auto;
    max-height: 90vh;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-col:last-child {
    border-left: none;
    padding-left: 0;
    border-top: 1px dashed #e2e8f0;
    padding-top: 20px;
  }
}