/* ===== Reset & Base ===== */

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

/* ===== Page: legacy index (removed) / test — page-index ===== */

.page-index body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #f8f3ec 0%, #e8f4f0 45%, #dfeaf5 100%);
  color: #1f1a17;
}

.page-index .login-container {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  max-width: 440px;
  padding: 24px 16px;
}

.page-index .auth-card__lang-row--index {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: #6b7280;
}

.page-index .auth-card__lang-label {
  font-weight: 600;
}

.page-index .auth-card__lang-select--index {
  min-width: 11rem;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  color: #374151;
  font-size: 0.82rem;
  font-family: inherit;
}

.page-index .auth-card__lang-select--index:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.page-index .auth-card__hint code {
  font-size: 0.85em;
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: rgba(31, 26, 23, 0.06);
  font-family: ui-monospace, monospace;
}

.page-index h1 {
  margin: 0 0 8px;
  font-size: 28px;
  color: #333;
  text-align: center;
}

.page-index .subtitle {
  text-align: center;
  color: #999;
  font-size: 12px;
  margin: 0 0 32px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-index .form-group {
  margin-bottom: 20px;
}

.page-index label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.page-index input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 200ms;
}

.page-index input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.page-index input:invalid {
  border-color: #dc2626;
}

.page-index button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms, box-shadow 120ms;
  margin-top: 24px;
}

.page-index button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.page-index button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.page-index .alert {
  padding: 16px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.6;
  display: none;
}

.page-index .alert.error {
  display: block;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.page-index .alert.success {
  display: block;
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.page-index .alert.info {
  display: block;
  background: #f0f4ff;
  border: 1px solid #c7d2fe;
  color: #1e3a8a;
}

.page-index .alert-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.page-index .disabled-for-security {
  margin-top: 16px;
  padding: 12px;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

.page-index .user-info {
  margin-top: 24px;
  padding: 16px;
  background: #f9f9f9;
  border-radius: 8px;
  display: none;
}

.page-index .user-info.visible {
  display: block;
}

.page-index .user-info-item {
  margin-bottom: 8px;
  font-size: 13px;
}

.page-index .user-info-label {
  font-weight: 600;
  color: #666;
}

.page-index .user-info-value {
  color: #333;
  word-break: break-all;
}

.page-index .logout-btn {
  width: 100%;
  padding: 10px;
  background: #ef4444;
  color: white;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}

.page-index .logout-btn:hover {
  background: #dc2626;
}

/* ===== Shared auth card (index + test) — Nuvidio-inspired ===== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-login-oauth body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  color: #1a1523;
  background: #fff;
}

.page-login-oauth .login-split {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 100vh;
  width: 100%;
}

.page-login-oauth .login-split__hero {
  flex: 0 0 58%;
  max-width: 58%;
  background: #e6e7ea;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem 1.5rem 4rem;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.page-login-oauth .login-split__hero-circle {
  position: relative;
  width: min(72vw, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f0f1f4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-login-oauth .login-split__hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(1);
}

.page-login-oauth .login-split__hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 18%;
  background: radial-gradient(120% 120% at 50% 100%, #2d1b4e 0%, #1a1030 55%, transparent 56%);
  opacity: 0.92;
  pointer-events: none;
}

.page-login-oauth .login-split__panel {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.page-login-oauth .login-container--split {
  max-width: 420px;
  padding: 32px 28px;
}

.page-login-oauth .auth-card--split {
  max-width: 420px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.page-login-oauth .auth-card__header--split {
  text-align: left;
  margin-bottom: 1.75rem;
}

.page-login-oauth .auth-card__header--split .auth-card__logo {
  margin: 0 0 1.25rem;
}

.page-login-oauth .auth-card--split .auth-card__title {
  color: #1e1b2e;
  font-size: 1.65rem;
  font-weight: 700;
  text-align: left;
}

.page-login-oauth .auth-card--split .auth-card__subtitle {
  color: #6b6578;
  text-align: left;
  font-size: 0.95rem;
}

.page-login-oauth .auth-card--split .form-group label {
  color: #3f3d4d;
  font-size: 0.875rem;
  font-weight: 600;
}

.page-login-oauth .auth-card--split .form-group input {
  background: #fff;
  border: 1px solid #d7d5df;
  color: #1a1523;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
}

.page-login-oauth .auth-card--split .form-group input::placeholder {
  color: #9b96a8;
}

.page-login-oauth .auth-card--split .form-group input:focus {
  outline: none;
  border-color: #5c2d91;
  box-shadow: 0 0 0 3px rgba(92, 45, 145, 0.15);
  background: #fff;
}

.page-login-oauth .password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.page-login-oauth .password-field input {
  flex: 1;
  padding-right: 2.75rem;
}

.page-login-oauth .password-field__toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: #6b6578;
  font-size: 0;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-login-oauth .password-field__toggle::before {
  content: '';
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* Senha mascarada (type=password): ícone olho “fechado”. Senha visível (type=text): olho aberto. */
.page-login-oauth .password-field__toggle--masked::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.29-.08.61-.08.94 0 2.76 2.24 5 5 5 .32 0 .63-.03.93-.08l1.55 1.55C14.53 17.94 13.31 18 12 18c-5 0-9.27-3.11-11-7.5 1.03-2.62 3.17-4.81 6.53-5.7z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.29-.08.61-.08.94 0 2.76 2.24 5 5 5 .32 0 .63-.03.93-.08l1.55 1.55C14.53 17.94 13.31 18 12 18c-5 0-9.27-3.11-11-7.5 1.03-2.62 3.17-4.81 6.53-5.7z'/%3E%3C/svg%3E");
}

.page-login-oauth .password-field__toggle--visible::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 9a3 3 0 100 6 3 3 0 000-6zm0-4.5c5 0 9.27 3.11 11 7.5-1.73 4.39-6 7.5-11 7.5S2.73 16.39 1 12c1.73-4.39 6-7.5 11-7.5z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 9a3 3 0 100 6 3 3 0 000-6zm0-4.5c5 0 9.27 3.11 11 7.5-1.73 4.39-6 7.5-11 7.5S2.73 16.39 1 12c1.73-4.39 6-7.5 11-7.5z'/%3E%3C/svg%3E");
}

.page-login-oauth .password-field__toggle:hover {
  background: rgba(92, 45, 145, 0.08);
  color: #5c2d91;
}

.page-login-oauth .auth-card__links {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.25rem 0 1.25rem;
  font-size: 0.82rem;
}

.page-login-oauth .auth-card__link {
  color: #5c2d91;
  text-decoration: none;
  font-weight: 500;
}

.page-login-oauth .auth-card__link:hover {
  text-decoration: underline;
}

.page-login-oauth .btn--block {
  width: 100%;
}

.page-login-oauth .auth-card--split .btn--primary {
  background: #4a148c;
  border: 0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 1rem;
}

.page-login-oauth .auth-card--split .btn--primary:hover:not(:disabled) {
  background: #5c2d91;
  box-shadow: 0 8px 24px rgba(74, 20, 140, 0.28);
  transform: translateY(-1px);
}

.page-login-oauth .btn--outline {
  background: #fff;
  border: 1px solid #cfcdd6;
  color: #2d2640;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.page-login-oauth .btn--outline:hover:not(:disabled) {
  border-color: #9c94ac;
  background: #fafafa;
}

.page-login-oauth .auth-card--split .auth-divider {
  margin: 1.35rem 0;
}

.page-login-oauth .auth-card--split .auth-divider span {
  background: #fff;
  color: #8c8799;
}

.page-login-oauth .auth-card--split .auth-card__footer {
  border-top: 1px solid #eceaf0;
  padding-top: 1.25rem;
  margin-top: 1.5rem;
}

.page-login-oauth .auth-card--split .auth-card__lang-row {
  color: #6b6578;
}

.page-login-oauth .auth-card--split .auth-card__lang-select {
  background: #fff;
  border: 1px solid #d7d5df;
  color: #1a1523;
}

.page-login-oauth .auth-card--split .auth-card__legal {
  color: #8c8799;
}

.page-login-oauth .auth-card--split .alert--error {
  margin-top: 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.page-login-oauth .auth-card--split .alert--info {
  margin-top: 1rem;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #5b21b6;
}

.page-login-oauth .auth-card--split #sectionMFA .auth-card__title {
  color: #1e1b2e;
}

@media (max-width: 900px) {
  .page-login-oauth .login-split {
    flex-direction: column;
  }

  .page-login-oauth .login-split__hero {
    flex: none;
    max-width: none;
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .page-login-oauth .login-split__hero-circle {
    width: min(56vw, 260px);
  }

  .page-login-oauth .login-split__panel {
    flex: 1;
    padding-bottom: 2rem;
  }
}

.page-index .auth-card,
.page-test .auth-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 40px 36px 28px;
  background: #fffaf3;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(31, 26, 23, 0.12);
  border: 1px solid rgba(217, 203, 189, 0.85);
}

.page-test body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #f8f3ec 0%, #e8f4f0 45%, #dfeaf5 100%);
  color: #1f1a17;
}

.auth-card__header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card__logo {
  display: block;
  margin: 0 auto 20px;
  max-width: 220px;
  height: auto;
}

.auth-card__title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e3a8a;
  letter-spacing: -0.02em;
}

.auth-card__title--compact {
  font-size: 1rem;
}

.auth-card__subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: #6a5d53;
}

.auth-card__section {
  margin-bottom: 8px;
}

.auth-card__hint {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: #6a5d53;
  line-height: 1.45;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #c4b8b0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5ddd4;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn--primary {
  background: linear-gradient(135deg, #1d6b57 0%, #1e40af 100%);
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(29, 107, 87, 0.25);
}

.btn--secondary {
  background: linear-gradient(135deg, #3b82f6 0%, #1e3a8a 100%);
  color: #fff;
  margin-top: 8px;
}

.btn--secondary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(59, 130, 246, 0.25);
}

.btn--danger {
  background: #dc2626;
  color: #fff;
  margin-top: 12px;
}

.btn--danger:hover {
  background: #b91c1c;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.auth-card .form-group {
  margin-bottom: 14px;
}

.auth-card .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-card .form-group input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fafafa;
}

.auth-card .form-group input:focus {
  outline: none;
  border-color: #1d6b57;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29, 107, 87, 0.12);
}

.alert {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

.user-panel {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.user-panel__line {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
}

.user-panel__line .label {
  font-weight: 600;
  color: #6b7280;
  margin-right: 0.35rem;
}

.auth-card__footer {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5ddd4;
}

.auth-card__legal {
  margin: 0;
  font-size: 0.72rem;
  color: #9ca3af;
  text-align: center;
}

.page-test .test-debug {
  margin-top: 1rem;
  padding: 0.75rem;
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow: auto;
  background: #1d1b1a;
  color: #f3ede5;
  border-radius: 10px;
}

.page-index .logout-btn {
  margin-top: 0;
}
