/* Complementos ao Tailwind: cartões que viram, texto gerado pela IA e animações. */

:root {
  color-scheme: dark;
}

[hidden] { display: none !important; }

/* Acesso: CSS independente do Tailwind CDN, inclusive sem conexão externa. */
.posse-login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 28px 16px; color: #f3f7fc; }
.posse-login-card { box-sizing: border-box; min-width: 0; width: 100%; max-width: 430px; padding: clamp(24px, 5vw, 40px); border: 1px solid rgba(255,255,255,.12); border-radius: 24px; background: linear-gradient(145deg,#111c29,#0b121e 68%); box-shadow: 0 24px 80px rgba(0,0,0,.3); }
.posse-login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.posse-login-brand-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: rgba(63,214,165,.09); border: 1px solid rgba(63,214,165,.18); }
.posse-login-brand strong { display: block; font-size: 21px; font-weight: 850; letter-spacing: .08em; line-height: 1.1; }
.posse-login-brand > div > span { display: block; margin-top: 6px; color: #8c9cac; font-size: 10px; letter-spacing: .18em; }
.posse-login-badge { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px; color: #54deb1; background: rgba(63,214,165,.1); border-radius: 14px; }
.posse-login-badge svg { width: 24px; height: 24px; }
.posse-login h1 { font-size: clamp(25px, 5vw, 31px); line-height: 1.14; letter-spacing: -.03em; font-weight: 800; }
.posse-login-description { margin-top: 10px; margin-bottom: 28px; color: #a6b2c2; line-height: 1.6; font-size: 14px; }
.posse-login-form { display: flex; flex-direction: column; gap: 11px; }
.posse-login-form label { color: #dae4ee; font-size: 13px; font-weight: 650; }
.posse-login-field { display: flex; align-items: center; gap: 12px; min-height: 50px; margin-bottom: 7px; padding: 0 13px; background: #09111b; border: 1px solid #324355; border-radius: 12px; transition: border-color .15s; }
.posse-login-field:focus-within { border-color: #3fd6a5; box-shadow: 0 0 0 3px rgba(63,214,165,.1); }
.posse-login-field > svg { width: 20px; height: 20px; flex-shrink: 0; color: #8ba1b3; }
.posse-login-field input { min-width: 0; width: 100%; height: 48px; outline: none; border: none; color: #f3f7fc; background: transparent; font: inherit; font-size: 15px; }
.posse-login-field input::placeholder { color: #7e91a4; }
.posse-password-toggle { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 9px; color: #a6b2c2; background: transparent; cursor: pointer; }
.posse-password-toggle:hover { color: #fff; background: rgba(255,255,255,.07); }
.posse-password-toggle svg { width: 20px; height: 20px; }
.posse-login-submit { display: flex; justify-content: center; align-items: center; gap: 11px; width: 100%; min-height: 52px; margin-top: 9px; border: none; border-radius: 12px; background: #3fd6a5; color: #071812; font-size: 15px; font-weight: 800; cursor: pointer; }
.posse-login-submit:hover { background: #75e9c1; }
.posse-login-submit:disabled { opacity: .6; cursor: wait; }
.posse-login-submit svg { width: 19px; height: 19px; }
.posse-login-message { min-height: 20px; margin: 0; font-size: 13px; color: #f9c443; line-height: 1.5; }
.posse-login-footnote { border-top: 1px solid rgba(255,255,255,.1); margin-top: 12px; padding-top: 18px; font-size: 12px; line-height: 1.6; text-align: center; color: #8799ac; }

body {
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(22, 189, 138, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(249, 196, 67, 0.05), transparent 60%);
  background-attachment: fixed;
}

:focus-visible {
  outline: 2px solid #3fd6a5;
  outline-offset: 2px;
}

/* Cartão de flashcard que vira */
.flip {
  perspective: 1200px;
}
.flip-inner {
  position: relative;
  min-height: 9.5rem;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  transform-style: preserve-3d;
}
.flip.is-flipped .flip-inner {
  transform: rotateY(180deg);
}
.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-back {
  transform: rotateY(180deg);
}

/* Texto em Markdown simples vindo da IA */
.md p + p,
.md p + ul,
.md p + ol,
.md ul + p,
.md ol + p,
.md h4 + p {
  margin-top: 0.6rem;
}
.md ul,
.md ol {
  margin-top: 0.4rem;
  padding-left: 1.2rem;
}
.md ul {
  list-style: disc;
}
.md ol {
  list-style: decimal;
}
.md li + li {
  margin-top: 0.25rem;
}
.md h4 {
  margin-top: 0.9rem;
  font-weight: 700;
  color: #fff;
}
.md strong {
  color: #fff;
  font-weight: 600;
}
.md code {
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.07);
  padding: 0.05rem 0.35rem;
  font-size: 0.9em;
}

/* Barra de progresso indeterminada */
.shimmer {
  position: relative;
  overflow: hidden;
}
.shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(124, 233, 196, 0.35), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

.cursor-blink::after {
  content: '▍';
  margin-left: 2px;
  color: #3fd6a5;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink {
  to {
    visibility: hidden;
  }
}

.fade-in {
  animation: fade-in 0.25s ease-out both;
}
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.scrollbar-none {
  scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
