/* ── Login modernizado — estilos específicos da página ── */

/* Tokens */
:root {
  --bg: #0f0f18;
  --surface: rgba(255,255,255,.035);
  --text: #eceef6;
  --text-2: #aab0c4;
  --text-3: #838a9e;
  --border: rgba(255,255,255,.09);
  --soft: rgba(255,255,255,.05);
  --action: #6c4cc4;
  --link: #bca9ec;
  --grad: linear-gradient(130deg,#2D6FE0 0%,#6B3FA0 36%,#C0297A 72%,#F26A21 100%);
  --r-sm: 13px;
  --r-md: 16px;
  --r-lg: 20px;
  --ring: rgba(140,110,230,.35);
  --shadow: 0 10px 30px rgba(0,0,0,.4);
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
}

/* Reset base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Layout split-screen */
.login-wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
}
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .brandside { display: none !important; }
}

/* Lado esquerdo: brand */
.brandside {
  position: relative;
  overflow: hidden;
  padding: 54px 60px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(150deg, #0c0c18 0%, #15102a 55%, #1b1030 100%);
  color: #fff;
}
.brandside::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 32% at 80% 8%, rgba(242,106,33,.22), transparent 60%),
    radial-gradient(45% 38% at 12% 92%, rgba(45,111,224,.24), transparent 60%),
    radial-gradient(38% 30% at 60% 60%, rgba(195,40,120,.16), transparent 60%);
}
.brandside .orbit {
  position: absolute;
  right: -160px;
  top: 50%;
  transform: translateY(-50%);
  width: 620px;
  height: 620px;
  opacity: .5;
}
.brandmid {
  margin-top: auto;
  margin-bottom: auto;
  position: relative;
  z-index: 2;
  max-width: 34ch;
}
.brandmid .kick {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.brandmid h1 {
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.02;
  margin: 18px 0 18px;
}
.brandmid h1 .g {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brandmid p {
  color: rgba(255,255,255,.72);
  font-size: 16px;
  line-height: 1.6;
}
.feat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 34px;
}
.feat .f {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 14px;
  color: rgba(255,255,255,.85);
}
.feat .f .fi {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  display: grid;
  place-items: center;
  color: #c9a9ee;
  flex: 0 0 auto;
  font-size: 17px;
}
.brandfoot {
  position: relative;
  z-index: 2;
  font-size: 12px;
  color: rgba(255,255,255,.4);
  margin-top: 34px;
}

/* Lado direito: formulário */
.formside {
  display: grid;
  place-items: center;
  padding: 40px 28px;
  background: linear-gradient(180deg, #0f0f1a, #141426);
  position: relative;
}
.formside::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 40% at 50% 0%, rgba(83,51,163,.16), transparent 60%);
  pointer-events: none;
}
.formcard {
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 2;
}
.formcard .top {
  margin-bottom: 26px;
  text-align: center;
}
.formlogo {
  display: block;
  width: clamp(168px, 46%, 196px);
  height: auto;
  margin: 0 auto 22px;
  filter: drop-shadow(0 5px 24px rgba(120,60,180,.28));
}
.formcard h2 {
  color: #eceef6;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 6px;
}
.formcard .sub {
  color: #9aa0b4;
  font-size: 14px;
}

/* Alertas */
.alert-box {
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.alert-box.alert-error {
  background: rgba(220,50,70,.12);
  border: 1px solid rgba(220,50,70,.25);
  color: #f09aa0;
}
.alert-box.alert-success {
  background: rgba(50,190,100,.1);
  border: 1px solid rgba(50,190,100,.22);
  color: #6de49a;
}
.alert-box .alert-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Form fields */
.formcard form {
  display: flex;
  flex-direction: column;
  gap: 17px;
  margin-top: 26px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  font-family: var(--mono);
  letter-spacing: .04em;
}
.field input {
  background: rgba(255,255,255,.045);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14.5px;
  padding: 11px 14px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  width: 100%;
}
.field input:focus {
  border-color: rgba(140,110,230,.5);
  box-shadow: 0 0 0 3px var(--ring);
}
.field input::placeholder { color: var(--text-3); }

/* Password wrapper */
.pwd { position: relative; }
.pwd input { padding-right: 44px; }
.pwd .eye {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text-3);
  cursor: pointer;
  background: none;
  border: none;
  font-size: 17px;
  transition: color .15s;
  padding: 0;
}
.pwd .eye:hover { color: #c9a9ee; }

/* Link esqueci senha */
.forgot-row {
  text-align: right;
  margin-top: -6px;
}
.forgot {
  color: var(--link);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.forgot:hover { text-decoration: underline; }

/* Botão login animado */
.login-btn {
  background: linear-gradient(270deg, #F26A21, #C0297A, #6B3FA0, #2D6FE0, #6B3FA0, #C0297A, #F26A21);
  background-size: 400% 400%;
  animation: loginGrad 12s ease infinite;
  border: none;
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  border-radius: var(--r-sm);
  padding: 13px;
  font-size: 15px;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
  transition: opacity .15s;
}
.login-btn:hover { opacity: .9; }
.login-btn:active { opacity: .8; }
@keyframes loginGrad {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .login-btn { animation: none; }
}

/* iOS add-to-home */
#ios-add-to-home {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 9999;
  background: rgba(18, 19, 28, 0.95);
  color: #fff;
  padding: 15px 20px;
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  display: none;
}
#ios-add-to-home strong { color: rgb(105, 72, 190); }
#ios-add-to-home .close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  background: transparent;
  border: none;
  font-weight: bold;
}
#ios-add-to-home .close-btn:hover { color: #ccc; }
