.qa-auth-shell {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.qa-auth-shell.is-open {
  display: block;
}

.qa-auth-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(0, 201, 167, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(13, 17, 21, 0.4), transparent 30%),
    rgba(9, 11, 15, 0.78);
  backdrop-filter: blur(14px);
}

.qa-auth-card {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  margin: 8vh auto 0;
  padding: 24px 24px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 17, 21, 0.94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  color: #f5f4ef;
  font-family: 'IBM Plex Sans Condensed', sans-serif;
}

.qa-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(0, 201, 167, 0.12);
  border: 1px solid rgba(0, 201, 167, 0.28);
  color: #7be7d5;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qa-auth-title {
  margin: 18px 0 6px;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.qa-auth-subtitle {
  margin: 0 0 18px;
  color: rgba(245, 244, 239, 0.72);
  font-size: 14px;
  line-height: 1.45;
}

.qa-auth-form {
  display: grid;
  gap: 14px;
}

.qa-auth-field {
  display: grid;
  gap: 8px;
}

.qa-auth-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 244, 239, 0.64);
}

.qa-auth-input,
.qa-auth-select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #f5f4ef;
  font: inherit;
  outline: none;
}

.qa-auth-input:focus,
.qa-auth-select:focus {
  border-color: rgba(0, 201, 167, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 201, 167, 0.14);
}

.qa-auth-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

.qa-auth-submit,
.qa-auth-logout {
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.qa-auth-submit {
  background: linear-gradient(135deg, #00c9a7, #27d8c0);
  color: #0d1115;
  box-shadow: 0 14px 30px rgba(0, 201, 167, 0.24);
}

.qa-auth-submit[disabled] {
  opacity: 0.62;
  cursor: wait;
}

.qa-auth-status {
  min-height: 20px;
  font-size: 13px;
  color: rgba(245, 244, 239, 0.76);
}

.qa-auth-status.is-error {
  color: #ff8e87;
}

.qa-auth-status.is-success {
  color: #7be7d5;
}

.qa-auth-banner {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9997;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(15, 17, 21, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  font-family: 'IBM Plex Sans Condensed', sans-serif;
  color: #f5f4ef;
}

.qa-auth-banner.is-inline {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  margin-left: auto;
  flex-shrink: 0;
}

.qa-auth-banner.is-open {
  display: inline-flex;
}

.qa-auth-role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 2px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 244, 239, 0.84);
}

.qa-auth-role-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #00c9a7;
}

.qa-auth-role.viewer .qa-auth-role-dot {
  background: #ffb84d;
}

.qa-auth-hint {
  font-size: 12px;
  color: rgba(245, 244, 239, 0.62);
}

.qa-auth-logout {
  background: rgba(255, 255, 255, 0.08);
  color: #f5f4ef;
}

body.qa-auth-locked {
  overflow: hidden;
}

body.qa-viewer [data-auth-lock="true"] {
  opacity: 0.38 !important;
  filter: grayscale(0.18);
  cursor: not-allowed !important;
}

body.qa-viewer [data-auth-lock="true"] * {
  pointer-events: none !important;
}

body.qa-viewer input[data-auth-lock="true"],
body.qa-viewer textarea[data-auth-lock="true"],
body.qa-viewer select[data-auth-lock="true"],
body.qa-viewer button[data-auth-lock="true"] {
  pointer-events: none !important;
}

@media (max-width: 720px) {
  .qa-auth-card {
    margin-top: 18px;
    border-radius: 18px;
    padding: 20px 18px 18px;
  }

  .qa-auth-title {
    font-size: 26px;
  }

  .qa-auth-banner {
    left: 12px;
    right: 12px;
    justify-content: space-between;
  }

  .qa-auth-banner.is-inline {
    left: auto;
    right: auto;
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
}
