*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #0f1923;
  --ink-soft: #3d4f5f;
  --ink-muted: #8a9aaa;
  --paper: #f5f2ed;
  --paper-pure: #ffffff;
  --rust: #c8432a;
  --rust-light: #e85d42;
  --rust-pale: #fdf0ed;
  --teal: #2a7c74;
  --gold: #c4922a;
  --border: #ddd8d0;
  --shadow-sm: 0 2px 8px rgba(15,25,35,.08);
  --shadow-md: 0 8px 32px rgba(15,25,35,.12);
  --shadow-lg: 0 24px 64px rgba(15,25,35,.18);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', sans-serif;
  --radius: 14px;
  --ease: cubic-bezier(.4,0,.2,1);
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}

/* ── LAYOUT ─────────────────────────────── */
.wrapper {
  display: grid;
  grid-template-columns: 1fr 480px;
  height: 100vh;
  position: relative;
}

/* ── LEFT PANEL ─────────────────────────────── */
.left {
  background: var(--ink);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 52px 56px;
}

/* Geometric background pattern */
.left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 70%, rgba(200,67,42,.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 80% 20%, rgba(42,124,116,.14) 0%, transparent 55%);
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Floating shapes */
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  animation: drift 12s ease-in-out infinite alternate;
}
.s1 { width: 320px; height: 320px; top: -80px; right: -80px; border: 1px solid rgba(200,67,42,.15); animation-delay: 0s; }
.s2 { width: 200px; height: 200px; top: 60px; right: 60px; border: 1px solid rgba(200,67,42,.08); animation-delay: -3s; }
.s3 { width: 160px; height: 160px; top: 40%; left: -40px; background: rgba(42,124,116,.06); border: 1px solid rgba(42,124,116,.12); animation-delay: -6s; }
.s4 { width: 80px; height: 80px; bottom: 30%; right: 20%; background: rgba(196,146,42,.08); animation-delay: -9s; }

@keyframes drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(12px, 20px) rotate(8deg); }
}

/* Stats pills */
.stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 36px;
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: fadeUp .6s var(--ease) .2s forwards;
}
.stat-pill {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 40px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
}
.stat-pill-dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-rust { background: var(--rust-light); box-shadow: 0 0 8px rgba(232,93,66,.5); }
.dot-teal { background: #3db8ae; box-shadow: 0 0 8px rgba(61,184,174,.5); }
.dot-gold { background: #e0ac48; box-shadow: 0 0 8px rgba(224,172,72,.5); }
.stat-pill span { font-size: 12px; color: rgba(255,255,255,.7); font-weight: 500; }
.stat-pill strong { font-size: 13px; color: #fff; }

.left-headline {
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: fadeUp .7s var(--ease) .35s forwards;
}
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--rust-light);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--rust-light);
}
.left-headline h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 900;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 18px;
  letter-spacing: -.5px;
}
.left-headline h1 em {
  font-style: italic;
  color: rgba(255,255,255,.5);
}
.left-headline p {
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(255,255,255,.5);
  max-width: 380px;
  font-weight: 300;
}

.left-footer {
  position: relative;
  z-index: 2;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  animation: fadeUp .6s var(--ease) .5s forwards;
}
.school-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}
.school-icon {
  width: 40px;
  height: 40px;
  background: var(--rust);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  color: #fff;
}
.school-name { font-size: 13px; font-weight: 600; color: #fff; }
.school-year { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 1px; }
.version-tag { font-size: 11px; color: rgba(255,255,255,.25); letter-spacing: 1px; }

/* ── RIGHT PANEL ─────────────────────────────── */
.right {
  background: var(--paper-pure);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 52px;
  position: relative;
  overflow: hidden;
  box-shadow: -20px 0 60px rgba(15,25,35,.1);
}

.right::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,67,42,.04), transparent 70%);
  pointer-events: none;
}

/* Tabs: Login / Esqueci */
.view { display: none; }
.view.active { display: flex; flex-direction: column; gap: 0; }

/* ── FORM HEADER ─────────────────────────────── */
.form-header {
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp .5s var(--ease) .1s forwards;
}
.form-header .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--rust-pale);
  border: 1px solid rgba(200,67,42,.15);
  color: var(--rust);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.form-header h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 8px;
}
.form-header p {
  font-size: 14px;
  color: var(--ink-muted);
  font-weight: 300;
  line-height: 1.5;
}

/* ── INPUTS ─────────────────────────────── */
.fields { display: flex; flex-direction: column; gap: 16px; }

.field {
  opacity: 0;
  animation: fadeUp .5s var(--ease) forwards;
}
.field:nth-child(1) { animation-delay: .2s; }
.field:nth-child(2) { animation-delay: .3s; }
.field:nth-child(3) { animation-delay: .4s; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 7px;
  letter-spacing: .3px;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 13px 44px 13px 44px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s var(--ease), background .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.input-wrap input::placeholder { color: var(--ink-muted); font-weight: 300; }
.input-wrap input:focus {
  border-color: var(--rust);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(200,67,42,.08);
}
.input-wrap input.error {
  border-color: #e04040;
  box-shadow: 0 0 0 4px rgba(224,64,64,.07);
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
  transition: color .2s;
}
.input-wrap input:focus ~ .input-icon { color: var(--rust); }

.eye-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-muted);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .2s;
}
.eye-toggle:hover { color: var(--ink); }
.eye-toggle svg { width: 17px; height: 17px; }

.field-error {
  font-size: 11.5px;
  color: #e04040;
  margin-top: 5px;
  display: none;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.field-error.show { display: flex; }

/* ── EXTRAS ROW ─────────────────────────────── */
.extras-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  opacity: 0;
  animation: fadeUp .5s var(--ease) .45s forwards;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}
.checkbox-label input[type=checkbox] { display: none; }
.custom-check {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s var(--ease);
  flex-shrink: 0;
}
.checkbox-label input:checked + .custom-check {
  background: var(--rust);
  border-color: var(--rust);
}
.custom-check svg {
  width: 11px;
  height: 11px;
  color: #fff;
  opacity: 0;
  transform: scale(.5);
  transition: all .15s var(--ease);
}
.checkbox-label input:checked + .custom-check svg {
  opacity: 1;
  transform: scale(1);
}
.check-text { font-size: 13px; color: var(--ink-soft); font-weight: 400; }

.forgot-link {
  font-size: 13px;
  color: var(--rust);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
}
.forgot-link:hover { color: var(--rust-light); text-decoration: underline; }

/* ── SUBMIT ─────────────────────────────── */
.btn-submit {
  position: relative;
  width: 100%;
  padding: 15px;
  background: var(--rust);
  color: #fff;
  border: none;
  border-radius: 11px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .3px;
  transition: background .2s, transform .15s, box-shadow .2s;
  margin-top: 24px;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp .5s var(--ease) .55s forwards;
}
.btn-submit:hover {
  background: var(--rust-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(200,67,42,.3);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit .btn-ripple {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.1), transparent);
  pointer-events: none;
}
.btn-submit .spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto;
}
.btn-submit.loading span { display: none; }
.btn-submit.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── DIVIDER ─────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  opacity: 0;
  animation: fadeUp .5s var(--ease) .6s forwards;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider span { font-size: 11.5px; color: var(--ink-muted); white-space: nowrap; font-weight: 500; letter-spacing: .5px; }

/* ── PROFILE SELECTOR ─────────────────────────────── */
.profiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  opacity: 0;
  animation: fadeUp .5s var(--ease) .65s forwards;
}
.profile-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--paper);
  cursor: pointer;
  transition: all .2s var(--ease);
  font-family: var(--font-body);
  text-align: center;
}
.profile-btn:hover {
  border-color: var(--rust);
  background: var(--rust-pale);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.profile-btn .icon { font-size: 22px; line-height: 1; }
.profile-btn .name { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.profile-btn .desc { font-size: 10.5px; color: var(--ink-muted); font-weight: 400; }

/* ── BACK LINK ─────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  margin-bottom: 28px;
  transition: color .15s;
}
.back-link:hover { color: var(--ink); }
.back-link svg { width: 15px; height: 15px; }

/* ── SUCCESS STATE ─────────────────────────────── */
.success-box {
  text-align: center;
  padding: 32px 20px;
  animation: fadeUp .5s var(--ease) forwards;
}
.success-icon {
  width: 64px;
  height: 64px;
  background: rgba(42,124,116,.1);
  border: 2px solid rgba(42,124,116,.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.success-icon svg { width: 28px; height: 28px; color: var(--teal); }
.success-box h3 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.success-box p { font-size: 13.5px; color: var(--ink-muted); line-height: 1.6; font-weight: 300; }
.success-box .email-highlight { color: var(--teal); font-weight: 600; }

/* ── DECORATIVE DOTS ─────────────────────────────── */
.dots-deco {
  position: absolute;
  bottom: 40px;
  right: 40px;
  display: grid;
  grid-template-columns: repeat(5, 6px);
  gap: 5px;
  opacity: .15;
  pointer-events: none;
}
.dots-deco span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rust);
}

/* ── SECURITY BAR ─────────────────────────────── */
.security-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 14px;
  background: var(--paper);
  border-radius: 8px;
  border: 1px solid var(--border);
  opacity: 0;
  animation: fadeUp .5s var(--ease) .7s forwards;
}
.security-note svg { width: 14px; height: 14px; color: var(--teal); flex-shrink: 0; }
.security-note span { font-size: 11.5px; color: var(--ink-muted); font-weight: 400; }

/* ── NOTIFICATION ─────────────────────────────── */
.notif {
  position: fixed;
  top: 24px;
  right: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  z-index: 999;
  transform: translateX(120%);
  transition: transform .35s var(--ease);
  max-width: 320px;
}
.notif.show { transform: translateX(0); }
.notif-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-icon.success-bg { background: rgba(42,124,116,.1); }
.notif-icon.error-bg { background: rgba(224,64,64,.08); }
.notif-icon svg { width: 18px; height: 18px; }
.notif-icon.success-bg svg { color: var(--teal); }
.notif-icon.error-bg svg { color: #e04040; }
.notif-body strong { display: block; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.notif-body span { color: var(--ink-muted); font-size: 12.5px; font-weight: 300; }

/* ── ANIMATIONS ─────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 800px) {
  html, body { overflow: auto; }
  .wrapper { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .left { display: none; }
  .right { min-height: 100vh; padding: 40px 28px; }
}

/* ── SCROLLBAR ─────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }