:root {
  --auth-bg: linear-gradient(135deg, #004d7a 0%, #008793 50%, #16c0b0 100%);
  --auth-card-radius: 24px;
  --auth-card-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.25);
  --auth-primary: #0d6efd;
  --auth-primary-hover: #0b5ed7;
  --auth-text-dark: #1f2a37;
  --auth-text-muted: #6b7280;
  --auth-border: rgba(15, 23, 42, 0.08);
  --auth-input-bg: rgba(255, 255, 255, 0.9);
  --auth-input-focus: rgba(13, 110, 253, 0.15);
  --auth-white: #ffffff;
}

.auth-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 4vw, 4rem) clamp(1rem, 3vw, 2rem);
  background: var(--auth-bg);
}

.auth-card {
  width: min(460px, 100%);
  padding: clamp(2rem, 5vw, 3rem);
  border-radius: var(--auth-card-radius);
  background: var(--auth-white);
  box-shadow: var(--auth-card-shadow);
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  text-align: left;
}

.auth-card--single {
  align-items: center;
  text-align: center;
}

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

.auth-card--single .auth-form {
  width: 100%;
  text-align: left;
}

.auth-card--single .auth-header {
  width: 100%;
}

.auth-logo__image {
  width: clamp(160px, 40vw, 220px);
  height: auto;
}

.auth-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-header--center {
  align-items: center;
  text-align: center;
  width: 100%;
}

.auth-header__title {
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  font-weight: 700;
  color: var(--auth-text-dark);
  margin: 0;
}

.auth-header__subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  color: var(--auth-text-muted);
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-grid {
  display: grid;
  gap: 1.5rem;
}

.auth-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-field .invalid-feedback {
  font-size: 0.85rem;
  color: #dc3545;
  margin: 0;
  white-space: normal;
}

.auth-error-line {
  display: block;
  line-height: 1.4;
}

.auth-help {
  font-size: 0.85rem;
  color: var(--auth-text-muted);
  margin-top: -0.25rem;
}

.auth-field__label-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--auth-border);
  background: rgba(220, 53, 69, 0.08);
  color: #b91c1c;
  font-size: 0.9rem;
}

.auth-alert__icon {
  font-size: 1rem;
  line-height: 1.4;
}

.auth-alert__content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.auth-field__label {
  font-weight: 600;
  color: var(--auth-text-dark);
  margin: 0;
}

.auth-input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--auth-input-bg);
  border-radius: 16px;
  border: 1px solid var(--auth-border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-group:focus-within {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px var(--auth-input-focus);
}

.auth-input-icon {
  padding-inline: 1rem;
  color: var(--auth-text-muted);
  display: flex;
  align-items: center;
}

.auth-input-group input {
  border: none !important;
  background: transparent !important;
  padding-block: 0.95rem;
  padding-inline: 0.5rem;
  font-size: 1rem;
  color: var(--auth-text-dark);
  border-radius: inherit;
  box-shadow: none !important;
}

.auth-input-group input:focus {
  outline: none;
}

.auth-input-toggle {
  border: none;
  background: none;
  color: var(--auth-text-muted);
  cursor: pointer;
  padding-inline: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-submit {
  margin-top: 0.5rem;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 0.95rem;
  font-size: 1.05rem;
  font-weight: 600;
  background: var(--auth-primary);
  color: var(--auth-white);
  cursor: pointer;
  box-shadow: 0 12px 24px -12px rgba(13, 110, 253, 0.65);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auth-submit:hover {
  background: var(--auth-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -16px rgba(13, 110, 253, 0.5);
}


.auth-footer {
  text-align: center;
  color: var(--auth-text-muted);
}

.auth-footer p {
  margin: 0;
  font-size: 0.95rem;
}

.auth-link {
  color: var(--auth-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-link--inline {
  font-size: 0.9rem;
}

.auth-submit-group {
  margin-top: 0.5rem;
}

.alert {
  border-radius: 16px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.auth-copy {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--auth-text-muted);
  margin: 0;
  text-align: center;
}

.auth-copy + .auth-copy {
  margin-top: 0.75rem;
}

@media (max-width: 600px) {
  .auth-section {
    padding: 1.5rem 1rem;
  }

  .auth-card {
    border-radius: 20px;
    padding: clamp(1.75rem, 6vw, 2.25rem);
  }

  .auth-header__title {
    font-size: 1.75rem;
  }

  .auth-submit {
    padding: 0.85rem;
    font-size: 1rem;
  }

  .auth-field__label-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .auth-link--inline {
    align-self: flex-start;
  }
}
