/* ===================== AUTH GATE — login/cadastro embutidos na matrícula =====================
   Usa os tokens de css/matricula.css (--surface, --ink, --gold, --bordeaux, --line,
   --muted, --error) para ficar visualmente igual ao resto do fluxo de matrícula. */

.ag-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(10, 10, 10, 0.6);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.ag-overlay.show { opacity: 1; pointer-events: auto; }

.ag-card {
  position: relative;
  width: 100%; max-width: 440px;
  max-height: 92vh; overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 30px 28px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.35);
  transform: scale(0.97) translateY(8px);
  transition: transform 0.25s ease;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
}
.ag-overlay.show .ag-card { transform: scale(1) translateY(0); }

.ag-back {
  display: inline-block; font-size: 13px; color: var(--muted); text-decoration: none;
  margin-bottom: 14px;
}
.ag-back:hover { color: var(--ink); }

.ag-eyebrow {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700;
  color: var(--gold); margin-bottom: 4px;
}
.ag-title {
  font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; line-height: 1.25;
  margin-bottom: 22px;
}

.ag-tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin-bottom: 22px; }
.ag-tab {
  flex: 1; background: none; border: none; cursor: pointer;
  padding: 10px 6px; font-weight: 700; font-size: 14px; color: var(--muted);
  border-bottom: 2.5px solid transparent; margin-bottom: -1.5px;
  font-family: 'Inter', sans-serif;
}
.ag-tab.active { color: var(--bordeaux); border-bottom-color: var(--bordeaux); }

.ag-field { margin-bottom: 14px; }
.ag-field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 5px; color: var(--muted); }
.ag-field input {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font-family: 'Inter', sans-serif; font-size: 14.5px;
}
.ag-field input:focus { outline: none; border-color: var(--gold); }

.ag-row { display: flex; gap: 12px; }
.ag-row .ag-field { flex: 1; min-width: 0; }

.ag-checkbox {
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft);
  margin: 4px 0 18px; cursor: pointer;
}
.ag-checkbox input { width: 16px; height: 16px; accent-color: var(--bordeaux); cursor: pointer; }

.ag-btn {
  width: 100%; padding: 13px; border-radius: 30px; border: none; cursor: pointer;
  background: var(--bordeaux); color: var(--on-accent, #fff); font-weight: 700; font-size: 15px;
  font-family: 'Inter', sans-serif; transition: background 0.2s ease;
}
.ag-btn:hover { background: var(--bordeaux-dark); }

.ag-msg { margin-top: 12px; font-size: 13.5px; font-weight: 600; min-height: 1.3em; text-align: center; }
.ag-msg.ok { color: var(--bordeaux); }
.ag-msg.erro { color: var(--error); }

.ag-link-btn {
  display: block; margin: 14px auto 0; background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: underline;
  font-family: 'Inter', sans-serif;
}
.ag-link-btn:hover { color: var(--ink); }

.ag-esqueci-texto { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }

@media (max-width: 480px) {
  .ag-row { flex-direction: column; gap: 0; }
  .ag-card { padding: 26px 20px 22px; }
}
