.container {
  display: flex;
  min-height: 100dvh;
  font-family: "DM Sans", sans-serif;
  color: var(--color-bg);
}

@supports not (min-height: 100dvh) {
  .container {
    min-height: 100vh;
  }
}

.mainContent {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2rem;
  background-color: var(--color-bg);
}

.loginSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 1;
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.logoImage {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.loginBox {
  background-color: var(--color-bg);
  width: min(100%, 460px);
  height: auto;
  margin-top: 2rem;
  padding: 2rem;

  border-radius: 10px;
  border: 1px solid var(--color-border, #E2E8F0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 
              0 0 10px rgba(0, 0, 0, 0.1);
}

.title {
  font-family: "DM Sans", sans-serif;
  color: var(--color-text);
}

.loginForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.floatingLabelInput {
  position: relative;
}

.label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-gray, #718096);
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.3s ease;
  background-color: transparent;
  font-family: var(--font-family);
}

.focusedLabel {
  position: absolute;
  left: 12px;
  top: -8px;
  transform: translateY(0);
  color: var(--color-secondary);
  font-size: 0.85rem;
  pointer-events: none;
  transition: all 0.3s ease;
  background-color: var(--color-bg);
  padding: 0 4px;
  font-family: var(--font-family);
  font-weight: 500;
}

.input {
  width: 100%;
  height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--color-gray-disabled);
  border-radius: 6px;

  font-size: 1rem;
  transition: all 0.15s ease;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
}

.input:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-secondary) 10%, transparent);
}

.input::placeholder {
  color: transparent;
}

/* Fix browser autocomplete styling */
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus,
.input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--color-bg) inset !important;
  -webkit-text-fill-color: var(--color-text) !important;
  background-color: var(--color-bg) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Ensure label background matches when autofilled */
.input:-webkit-autofill + .label,
.input:-webkit-autofill + .focusedLabel {
  background-color: var(--color-bg) !important;
}

.disclaimer {
  font-size: 0.8rem;
  color: var(--color-text);
  text-align: center;
}

.button {
  width: 100%;
  height: 50px;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-align: center;
  letter-spacing: 0.01em;
}

.buttonContent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.microsoftIcon {
  width: 18px;
  height: 18px;
}

.loginButton {
  background: linear-gradient(180deg, var(--color-secondary) 0%, var(--color-secondary-hover) 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.loginButton:hover {
  background: linear-gradient(180deg, var(--color-secondary-hover) 0%, var(--color-secondary-hover) 100%);
  box-shadow: 0 3px 8px rgba(74, 111, 165, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.loginButton:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

.microsoftButton {
  background: linear-gradient(180deg, #e8ecf0 0%, var(--color-gray-disabled, #CBD5E0) 100%);
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.microsoftButton:hover {
  background: linear-gradient(180deg, var(--color-gray, #718096) 0%, var(--color-gray-hover, #4A5568) 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.microsoftButton:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.googleButton {
  background: linear-gradient(180deg, #e8ecf0 0%, var(--color-gray-disabled, #CBD5E0) 100%);
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.googleButton:hover {
  background: linear-gradient(180deg, var(--color-gray, #718096) 0%, var(--color-gray-hover, #4A5568) 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.googleButton:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--color-gray-disabled);
}

.divider span {
  padding: 0 1rem;
  color: var(--color-text);
  font-size: 0.8rem;
}

.registerLink {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.registerLink span {
  color: var(--color-text);
  font-size: 0.8rem;
}

.textButton {
  background: none;
  border: none;
  color: var(--color-secondary);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
  font-family: var(--font-family);
}

.textButton:hover {
  text-decoration: underline;
}

.ctaSection {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.ctaPrimary {
  flex: 1;
  height: 46px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: linear-gradient(180deg, var(--color-secondary) 0%, var(--color-secondary-hover) 100%);
  color: #fff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-family);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ctaPrimary:hover {
  background: linear-gradient(180deg, var(--color-secondary-hover) 0%, var(--color-secondary-hover) 100%);
  box-shadow: 0 3px 8px rgba(74, 111, 165, 0.3);
  transform: translateY(-1px);
}

.ctaPrimary:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

.ctaSecondary {
  flex: 1;
  height: 46px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--color-secondary);
  background: linear-gradient(180deg, rgba(var(--color-secondary-rgb, 74, 111, 165), 0.03) 0%, rgba(var(--color-secondary-rgb, 74, 111, 165), 0.08) 100%);
  color: var(--color-secondary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-family);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ctaSecondary:hover {
  background: linear-gradient(180deg, rgba(var(--color-secondary-rgb, 74, 111, 165), 0.08) 0%, rgba(var(--color-secondary-rgb, 74, 111, 165), 0.15) 100%);
  box-shadow: 0 2px 6px rgba(74, 111, 165, 0.15);
  transform: translateY(-1px);
}

.ctaSecondary:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.error {
  color: var(--color-red);
  background-color: var(--color-red-disabled);
  border: 1px solid var(--color-red);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.9rem;
  text-align: center;
  font-family: var(--font-family);
}

.invitationNotice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background-color: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: #93c5fd;
}

.invitationIcon {
  flex-shrink: 0;
  font-size: 1.2rem;
  color: #3b82f6;
}

.passwordResetLink {
  display: flex;
  justify-content: center;
  margin-top: -0.5rem;
}

.passwordResetLink .textButton {
  color: var(--color-gray-disabled);
  font-size: 0.85rem;
}

.passwordResetLink .textButton:hover {
  color: var(--color-secondary);
}

@media (max-width: 768px) {
  .mainContent {
    padding: 1rem;
  }

  .logoImage {
    height: 40px;
  }

  .loginBox {
    width: 100%;
    margin-top: 1.25rem;
    padding: 1.25rem;
    border-radius: 10px;
  }

  .registerLink {
    flex-wrap: wrap;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .mainContent {
    padding: 0.75rem;
  }

  .loginBox {
    padding: 1rem;
    border-radius: 10px;
  }

  .input,
  .button {
    height: 48px;
  }
}
