.tab-button.active {
  color: #003d9b;
  border-bottom-color: #003d9b;
  font-weight: 800;
}

.page-header {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #003d9b;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(195, 198, 214, 0.4);
  background: rgba(255, 255, 255, 0.9);
}

.lang-button {
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #434654;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.page-main {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.auth-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 32.5rem;
  padding: 2rem;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(25, 28, 30, 0.04);
}

.card-orb {
  position: absolute;
  top: 0;
  right: 0;
  width: 8rem;
  height: 8rem;
  border-radius: 9999px;
  background: rgba(0, 61, 155, 0.05);
  filter: blur(48px);
  transform: translate(50%, -50%);
  pointer-events: none;
}

.card-section {
  position: relative;
  z-index: 10;
}

.card-header {
  margin-bottom: 2rem;
  text-align: center;
}

.card-title {
  margin: 0 0 0.5rem;
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #191c1e;
}

.card-description {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #434654;
}

.session-panel {
  margin-bottom: 1.5rem;
}

.session-card {
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(195, 198, 214, 0.3);
  background: #f3f4f6;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.session-card:hover {
  background: #edeef0;
}

.session-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.session-title {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: #191c1e;
}

.session-text {
  display: block;
  font-size: 0.875rem;
  line-height: 1.8;
  color: #434654;
}

.logout-button {
  flex-shrink: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(195, 198, 214, 0.3);
  background: #ffffff;
  color: #434654;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease;
}

.logout-button:hover {
  color: #003d9b;
}

.oauth-panel {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(0, 61, 155, 0.1);
  background: rgba(0, 61, 155, 0.05);
}

.oauth-eyebrow {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #003d9b;
}

.oauth-title {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #191c1e;
}

.oauth-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.8;
  color: #434654;
}

.scope-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.scope-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  background: rgba(0, 61, 155, 0.1);
  color: #003d9b;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.redirect-panel {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(195, 198, 214, 0.3);
  background: rgba(255, 255, 255, 0.9);
}

.redirect-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #737685;
}

.redirect-code {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #191c1e;
  word-break: break-all;
}

.auth-region {
  position: relative;
  z-index: 10;
}

.tabs-row {
  display: flex;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e1e2e4;
}

.tab-button {
  flex: 1;
  padding-bottom: 1rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #737685;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.status-box {
  display: none;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
}

.status-box.is-visible {
  display: block;
}

.status-box.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.status-box.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.status-box.is-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.auth-form {
  display: grid;
  gap: 1.25rem;
}

.field-group {
  display: grid;
  gap: 0.5rem;
}

.field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #737685;
}

.field-shell {
  position: relative;
}

.field-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #737685;
  font-size: 20px;
}

.field-shell .field-input {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 0;
  border-radius: 0.75rem;
  background-color: #e1e2e4;
  color: #191c1e;
  line-height: 1.5rem;
  box-shadow: none;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.field-shell .field-input::placeholder {
  color: rgba(115, 118, 133, 0.6);
}

.field-shell .field-input:focus {
  background-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(0, 61, 155, 0.2);
  outline: none;
}

.primary-submit {
  width: 100%;
  padding: 1rem;
  border: 0;
  border-radius: 0.75rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.primary-submit:hover {
  opacity: 0.92;
}

.primary-submit:active {
  transform: scale(0.98);
}

.secondary-submit,
.text-action-button {
  width: 100%;
  border: 1px solid rgba(18, 32, 51, 0.1);
  border-radius: 0.75rem;
  background: #ffffff;
  color: #0b57d0;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.secondary-submit {
  padding: 0.85rem 1rem;
}

.text-action-button {
  padding: 0.4rem 0;
  border-color: transparent;
  background: transparent;
  text-align: left;
}

.secondary-submit:hover,
.text-action-button:hover {
  border-color: rgba(11, 87, 208, 0.28);
  background: rgba(11, 87, 208, 0.06);
}

.primary-submit:disabled,
.secondary-submit:disabled,
.text-action-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.oidc-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #737685;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.oidc-divider::before,
.oidc-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e1e2e4;
}

.oidc-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(0, 61, 155, 0.2);
  border-radius: 0.75rem;
  background: #ffffff;
  color: #003d9b;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.oidc-submit:hover {
  border-color: rgba(0, 61, 155, 0.45);
  background: #f4f7ff;
}

@media (min-width: 768px) {
  .page-header {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .auth-card {
    padding: 2.5rem;
  }

  .card-description {
    font-size: 1rem;
  }

  .redirect-code {
    font-size: 0.875rem;
  }
}
