.authContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 70px);
  padding: 40px 20px;
  background: var(--background);
  position: relative;
  overflow: hidden;
}

/* Background elements for wow-factor */
.bgBlob1 {
  position: absolute;
  top: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0) 70%);
  z-index: 0;
}

.bgBlob2 {
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.15) 0%, rgba(5, 150, 105, 0) 70%);
  z-index: 0;
}

.authCard {
  width: 100%;
  max-width: 500px;
  padding: 40px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--primary);
}

.subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 32px;
}

.roleSelection {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.roleCard {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  border: 2px solid var(--border);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--foreground);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: all var(--transition-fast);
}

.roleCard:hover {
  background: var(--surface);
  border-color: rgba(16, 185, 129, 0.5);
  transform: translateY(-4px);
}

.roleCard.active {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.1);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.roleIcon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.roleTitle {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 4px;
}

.roleDesc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.referralNotice {
  margin: -12px 0 24px;
  padding: 10px 12px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: left;
}

.demoLoginPanel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -10px 0 22px;
  padding: 14px;
  border: 1px solid rgba(45, 212, 143, 0.24);
  border-radius: 10px;
  background: rgba(45, 212, 143, 0.08);
  text-align: left;
}

.demoLoginPanel span,
.demoLoginPanel strong {
  display: block;
}

.demoLoginPanel span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.demoLoginPanel strong {
  margin-top: 3px;
  color: var(--foreground);
  font-size: 0.94rem;
}

.demoLoginPanel button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(45, 212, 143, 0.36);
  border-radius: 8px;
  background: rgba(45, 212, 143, 0.12);
  color: var(--primary);
  font-weight: 800;
}

.demoLoginPanel button:hover {
  background: rgba(45, 212, 143, 0.2);
}

.demoLoginPanel button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.formGroup {
  margin-bottom: 20px;
  text-align: left;
}

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.8);
}

.input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.segmentedControl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
}

.segmentedControl button {
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.segmentedControl button:hover,
.segmentedControl button:focus-visible {
  color: var(--foreground);
}

.segmentedControl .segmentActive {
  background: rgba(16, 185, 129, 0.16);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.35);
}

.submitBtn {
  width: 100%;
  margin-top: 12px;
  font-size: 1.125rem;
  padding: 16px;
}

.submitBtn:disabled {
  cursor: wait;
  opacity: 0.75;
}

.passwordActions {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 20px;
}

.textButton {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.textButton:hover,
.textButton:focus-visible {
  text-decoration: underline;
}

.formMessage {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: left;
}

.errorMessage {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 8px;
  background: rgba(127, 29, 29, 0.16);
  color: rgba(254, 226, 226, 0.95);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: left;
}

.switchAuth {
  margin-top: 24px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.switchAuth button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  margin-left: 4px;
}

.switchAuth button:hover,
.switchAuth button:focus-visible {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .authCard {
    padding: 28px 20px;
  }

  .roleSelection {
    flex-direction: column;
  }

  .demoLoginPanel {
    align-items: stretch;
    flex-direction: column;
  }
}
