/* ─── Páginas de autenticação (setup / reset) ─────────────────── */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  margin: 0;
  box-sizing: border-box;
  background-color: var(--bg-app);
  background-image:
    radial-gradient(ellipse 80% 60% at 15% 90%, rgba(0, 144, 53, 0.07), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 10%, rgba(99, 102, 241, 0.1), transparent 50%),
    radial-gradient(rgb(248 250 252 / 0.4) 1px, transparent 1px);
  background-size: auto auto auto, auto auto auto, 28px 28px;
}

body.dark.auth-page,
body.theme-dark.auth-page {
  background-image:
    radial-gradient(ellipse 80% 60% at 15% 90%, rgba(16, 185, 129, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 10%, rgba(129, 140, 248, 0.09), transparent 50%),
    radial-gradient(rgb(148 163 184 / 0.06) 1px, transparent 1px);
  background-size: auto auto auto, auto auto auto, 28px 28px;
}

@media (prefers-color-scheme: dark) {
  body.theme-system:not(.theme-light).auth-page {
    background-image:
      radial-gradient(ellipse 80% 60% at 15% 90%, rgba(16, 185, 129, 0.08), transparent 55%),
      radial-gradient(ellipse 70% 50% at 85% 10%, rgba(129, 140, 248, 0.09), transparent 50%),
      radial-gradient(rgb(148 163 184 / 0.06) 1px, transparent 1px);
    background-size: auto auto auto, auto auto auto, 28px 28px;
  }
}

.auth-container {
  width: min(420px, 100%);
}

.auth-card {
  padding: 28px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle, var(--color-border, #e5e7eb));
  background: var(--bg-elevated, var(--color-surface, #fff));
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.6) inset,
    0 24px 60px rgb(15 23 42 / 0.1),
    0 0 0 1px rgb(99 102 241 / 0.04);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}

body.dark .auth-card,
body.theme-dark .auth-card {
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.06) inset,
    0 24px 64px rgb(0 0 0 / 0.45),
    0 0 0 1px rgb(99 102 241 / 0.08);
}

.auth-card.auth-card--flow {
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}

.auth-card__hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 20px;
  background: linear-gradient(
    125deg,
    rgba(99, 102, 241, 0.09) 0%,
    rgba(255, 255, 255, 0.02) 42%,
    rgba(0, 144, 53, 0.08) 100%
  );
  border-bottom: 1px solid var(--border-subtle);
}

body.dark .auth-card__hero,
body.theme-dark .auth-card__hero {
  background: linear-gradient(
    125deg,
    rgba(99, 102, 241, 0.14) 0%,
    rgba(15, 23, 42, 0.2) 45%,
    rgba(16, 185, 129, 0.1) 100%
  );
}

.auth-mini-wordmark {
  font-size: 1.2rem;
  font-weight: 800;
  font-family: var(--font-display, system-ui, sans-serif);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary);
}

.auth-mini-wordmark__ticket {
  color: var(--text-primary);
}

.auth-mini-wordmark__flow {
  background: linear-gradient(108deg, var(--primary, #6366f1) 0%, #009035 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-card__content {
  padding: 24px 28px 28px;
}

.auth-logo h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  font-family: var(--font-display, system-ui, sans-serif);
  letter-spacing: -0.03em;
  color: var(--text-primary, #111827);
}

.auth-logo p {
  margin: 8px 0 22px;
  color: var(--text-secondary, var(--color-muted));
  font-size: 14px;
  line-height: 1.45;
}

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

.link-btn {
  background: none;
  border: none;
  color: var(--primary, var(--color-primary));
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.remember-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 12px 0 18px;
  font-size: 14px;
  color: var(--text-secondary, var(--color-muted));
}

.btn-block {
  width: 100%;
}

.alert-error,
.alert-success {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 14px;
}

.alert-error {
  background: rgb(239 68 68 / 0.12);
  color: var(--color-danger);
}

.alert-success {
  background: rgb(34 197 94 / 0.12);
  color: rgb(21 128 61);
}

.md-dialog::backdrop {
  background: rgba(17, 24, 39, 0.52);
}

.md-dialog {
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  max-width: 360px;
}

.md-dialog .muted {
  font-size: 14px;
  color: var(--color-muted);
  margin-top: -4px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* Marca compacta — setup / reset (hero no cartão) */
.login-mark {
  width: 80px;
  height: 80px;
  margin: 0 auto 18px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  position: relative;
  background:
    radial-gradient(circle at 30% 25%, rgb(255 255 255 / 0.7), rgb(248 250 252 / 0.3)),
    linear-gradient(145deg, rgb(255 255 255 / 0.9), rgb(226 232 240 / 0.35));
  border: 1px solid rgb(255 255 255 / 0.55);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.8) inset,
    0 18px 40px rgb(0 144 53 / 0.12),
    0 8px 20px rgb(99 102 241 / 0.08);
}

body.dark .login-mark,
body.theme-dark .login-mark {
  background: linear-gradient(145deg, rgb(51 65 85 / 0.6), rgb(15 23 42 / 0.85));
  border: 1px solid rgb(148 163 184 / 0.15);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.06) inset,
    0 18px 40px rgb(0 0 0 / 0.35),
    0 0 0 1px rgb(16 185 129 / 0.12);
}

.login-mark__icon {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.login-mark--sm {
  width: 48px;
  height: 48px;
  margin: 0;
  border-radius: 14px;
}

.login-mark--sm .login-mark__icon {
  width: 28px;
  height: 28px;
}

.auth-card__hero .login-mark {
  flex-shrink: 0;
}

/* ─── Login TicketFlow: fundo branco, cartão compacto ───────────────────── */
body.login-page {
  min-height: 100vh;
  margin: 0;
  box-sizing: border-box;
  font-family: var(--font, system-ui, sans-serif);
  overflow-x: hidden;
  background: #ffffff;
}

body.login-page::before,
body.login-page::after {
  display: none;
}

.login-page .tf-page {
  min-height: 100vh;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
  font-family: inherit;
}

.login-page .tf-wrap {
  position: relative;
  z-index: 1;
  background: #e8ecf0;
  border-radius: 16px;
  padding: 1px;
  max-width: 860px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.login-page .tf-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 520px;
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
}

.login-page .tf-l {
  background: #05080e;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 40px;
  position: relative;
  overflow: hidden;
}

.login-page .tf-ghost {
  position: absolute;
  right: -120px;
  top: 50%;
  transform: translateY(-48%) rotate(8deg);
  width: 580px;
  opacity: 0.035;
  pointer-events: none;
}

.login-page .tf-glow-a {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 144, 53, 0.18) 0%, transparent 65%);
  bottom: -180px;
  left: -120px;
  pointer-events: none;
}

.login-page .tf-glow-b {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 144, 53, 0.08) 0%, transparent 65%);
  top: -40px;
  right: 80px;
  pointer-events: none;
}

.login-page .tf-mid {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  justify-content: center;
}

.login-page .tf-logo {
  width: 140px;
  height: auto;
  margin-bottom: 28px;
  display: block;
  filter:
    drop-shadow(0 0 36px rgba(0, 144, 53, 0.65))
    drop-shadow(0 0 100px rgba(0, 144, 53, 0.3));
}

.login-page .tf-h {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 16px;
  font-weight: 300;
  letter-spacing: -0.8px;
  line-height: 1.25;
  max-width: 440px;
}

.login-page .tf-h b {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #00d44a, #009035);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-page .tf-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  font-weight: 300;
  line-height: 1.7;
  max-width: 400px;
}

.login-page .tf-desc strong {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 400;
}

.login-page .tf-brand-bot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.login-page .tf-brand-icon {
  width: 24px;
  height: 22px;
  opacity: 0.85;
}

.login-page .tf-brand-name {
  font-size: 18px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: -0.3px;
}

.login-page .tf-brand-name b {
  font-weight: 700;
  background: linear-gradient(135deg, #00d44a, #009035);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-page .tf-r {
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 32px;
  border-left: 1px solid #eef1f4;
  position: relative;
  box-sizing: border-box;
}

.login-page .tf-r-inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  align-items: stretch;
}

.login-page .tf-form-head {
  margin: 0;
  padding: 0;
  border: none;
  width: 100%;
}

.login-page .tf-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.login-page .tf-title-mark {
  color: #009035;
  font-weight: 700;
  background: none;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: #009035;
}

.login-page .tf-sub {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748b;
  margin: 0;
  text-align: left;
}

.login-page #login-error {
  margin-bottom: 0;
}

.login-page #login-error[hidden] {
  display: none !important;
}

.login-page #login-error:not([hidden]).alert.alert-danger {
  box-sizing: border-box;
}

.login-page #login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.login-page .tf-lbl {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin: 0 0 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.login-page .tf-lbl a {
  color: #009035;
  font-weight: 500;
  text-decoration: none;
  font-size: 12px;
}

.login-page .tf-lbl a:hover {
  text-decoration: underline;
}

.login-page .tf-fw {
  position: relative;
  margin-bottom: 0;
}

.login-page .tf-inp {
  width: 100%;
  height: 48px;
  border: 1px solid #d1dae4;
  border-radius: 10px;
  padding: 0 44px 0 14px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  background: #fff;
  font-family: inherit;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  box-sizing: border-box;
}

.login-page .tf-inp::placeholder {
  color: #c8cfd8;
}

.login-page .tf-inp:focus {
  border-color: #009035;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 144, 53, 0.12);
}

.login-page .tf-ico {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #c8cfd8;
  pointer-events: none;
  transition: color 0.2s;
}

.login-page .tf-inp:focus ~ .tf-ico {
  color: #009035;
}

.login-page .tf-ck {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 0;
}

.login-page .tf-ck input {
  accent-color: #009035;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.login-page .tf-ck label {
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  line-height: 1.35;
  padding-top: 1px;
}

.login-page .tf-btn {
  width: 100%;
  height: 48px;
  background: #0f172a;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.01em;
  box-shadow: none;
  font-family: inherit;
  margin-top: 4px;
  transition: background 0.15s, opacity 0.15s;
}

.login-page .tf-btn:hover:not(:disabled) {
  transform: none;
  background: #1e293b;
  box-shadow: none;
}

.login-page .tf-btn:disabled {
  opacity: 0.78;
  cursor: not-allowed;
}

.login-page .tf-btn::before {
  display: none;
}

.login-page .tf-btn .ti-arrow-right {
  color: #fff;
  opacity: 0.85;
  font-size: 17px;
}

.login-page .tf-foot {
  margin: 0;
  padding-top: 4px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  font-size: 12px;
  color: #94a3b8;
}

.login-page .tf-foot-txt {
  flex: 1 1 auto;
  min-width: 0;
}

.login-page .tf-foot a {
  color: #64748b;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.login-page .tf-foot a:hover {
  color: #009035;
  text-decoration: underline;
}

@media (max-width: 900px) {
  .login-page .tf-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-page .tf-l {
    padding: 40px 28px;
  }

  .login-page .tf-r {
    padding: 36px 24px;
    border-left: none;
    border-top: 1px solid #eef1f4;
  }

  .login-page .tf-foot {
    justify-content: center;
    text-align: center;
  }

  .login-page .tf-foot-txt {
    flex-basis: 100%;
  }

  .login-page .tf-logo {
    width: 110px;
    margin-bottom: 22px;
  }

  .login-page .tf-h {
    font-size: 24px;
  }
}

.login-page .forgot-dialog-email {
  margin-bottom: 12px;
}

.login-page dialog.md-dialog,
.login-page .md-dialog {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-lg, 14px);
  padding: 20px;
  max-width: 400px;
  background: var(--bg-card, #fff);
  color: var(--text-primary, #0d1117);
}

.login-page .md-dialog h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
