:root{
  --bg0:#0a1628;
  --bg1:#08111f;

  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.09);
  --border:rgba(255,255,255,.12);

  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.65);
  --muted2:rgba(255,255,255,.45);

  --accent:#60a5fa;
  --accent2:#22c55e;

  --ok:#22c55e;
  --bad:#ef4444;

  --shadow:0 18px 50px rgba(0,0,0,.45);
  --shadow2:0 10px 25px rgba(0,0,0,.35);

  --radius:18px;
  --radius2:14px;

  --ring:0 0 0 4px rgba(96,165,250,.22);
  --ring-strong:0 0 0 6px rgba(96,165,250,.16);
  --ring-bad:0 0 0 4px rgba(239,68,68,.20);

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
html{
  background: var(--bg1);
}

body{
  margin:0;
  min-height:100vh;
  font-family:var(--font);
  color:var(--text);
  background-color: var(--bg1);
  background:
    radial-gradient(1200px 760px at 14% 0%, rgba(34,116,255,.22), transparent 56%),
    radial-gradient(980px 700px at 86% 12%, rgba(132,255,74,.14), transparent 56%),
    linear-gradient(180deg, var(--bg0) 0%, #0a1526 45%, var(--bg1) 100%);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-attachment: scroll, scroll, scroll;
  overflow:hidden;

  /* deixa seleção/caret mais bonito */
  caret-color: rgba(96,165,250,.95);
}

::selection{
  background: rgba(96,165,250,.28);
  color: rgba(255,255,255,.95);
}

.bg{
  position:fixed;
  inset:0;
  pointer-events:none;
  overflow:hidden;
}
.bg-blur{
  position:absolute;
  inset:-80px;
  background:
    radial-gradient(520px 420px at 12% 18%, rgba(96,165,250,.24), transparent 60%),
    radial-gradient(520px 420px at 88% 22%, rgba(34,197,94,.18), transparent 60%),
    radial-gradient(640px 480px at 60% 88%, rgba(34,197,94,.12), transparent 62%);
  filter: blur(18px);
  opacity:.9;
}

.page{
  position:relative;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.card{
  width:min(460px, 96vw);
  background: linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.045));
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  backdrop-filter: blur(12px);
  padding:24px 24px 16px;
  position:relative;
  overflow:hidden;
}

.card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(500px 220px at 50% 0%, rgba(96,165,250,.12), transparent 60%);
  pointer-events:none;
}

/* ===== BRAND ===== */
.brand{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-bottom:16px;
  position:relative;
  z-index:1;
}

.logo-img{
  width:118px;
  filter: drop-shadow(0 24px 34px rgba(96,165,250,.28));
  transform: translateY(12px);
}

.brandText{
  display:flex;
  flex-direction:column;
  gap:2px;
  text-align:center;
}
.brandName{
  font-family: var(--font-brand);
  font-weight:400;
  letter-spacing:.02em;
  font-size:44px;
  line-height:1.1;
}
.brandSomma{
  color:#dce6f2;
  font-weight:500;
}
.brandLabel{
  color:#aac700;
  font-size:.88em;
  font-weight:500;
  margin-left:1px;
}
.brandSub{
  font-size:12.5px;
  color: var(--muted2);
}

/* ===== FORM ===== */
.form{
  display:flex;
  flex-direction:column;
  gap:14px;
  position:relative;
  z-index:1;
}

.field{ display:flex; flex-direction:column; gap:8px; }

.field > span{
  font-size:13px;
  color:var(--muted);
  letter-spacing:.2px;
}

.input-wrap{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 12px;
  border-radius:var(--radius2);
  background: rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, transform .12s ease;
}

.input-wrap:hover{
  background: rgba(255,255,255,.065);
}

.input-wrap:focus-within{
  border-color: rgba(96,165,250,.60);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    var(--ring),
    0 10px 22px rgba(0,0,0,.18);
  transform: translateY(-1px);
}

.icon{
  width:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  opacity:.85;
  user-select:none;
}

input{
  flex:1;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
  font-size:15px;
  letter-spacing:.15px;

  /* sensação melhor de digitar */
  padding:2px 0;
}

input::placeholder{
  color: rgba(255,255,255,.38);
}

/* melhora autofill do Chrome */
input:-webkit-autofill{
  -webkit-text-fill-color: rgba(255,255,255,.92);
  transition: background-color 9999s ease-in-out 0s;
  caret-color: rgba(96,165,250,.95);
}

.toggle{
  border:0;
  outline:0;
  background:transparent;
  color:rgba(255,255,255,.78);
  cursor:pointer;
  padding:6px 8px;
  border-radius:10px;
  transition: background .15s ease, transform .15s ease, color .15s ease;
}

.toggle:hover{
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.9);
}
.toggle:active{ transform: translateY(1px); }

.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.check{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  color:var(--muted);
  user-select:none;
}

.check input{
  width:16px;
  height:16px;
  accent-color: var(--accent);
}

.link{
  border:0;
  background:transparent;
  color: rgba(96,165,250,.95);
  font-size:13px;
  cursor:pointer;
  padding:6px 8px;
  border-radius:10px;
  transition: background .15s ease, transform .15s ease;
}

.link:hover{ background: rgba(96,165,250,.12); }
.link:active{ transform: translateY(1px); }

.error{ display:none; }
.error.bad-ring{ box-shadow: var(--ring-bad); }

.toasts{
  position:fixed;
  top:18px;
  right:18px;
  z-index:1000;
  display:flex;
  flex-direction:column;
  gap:10px;
  pointer-events:none;
}

.toast{
  min-width:280px;
  max-width:min(360px, calc(100vw - 36px));
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(12,18,32,.94);
  box-shadow:0 16px 36px rgba(0,0,0,.32);
  backdrop-filter:blur(10px);
  pointer-events:auto;
}

.toast .ticon{
  width:10px;
  height:10px;
  border-radius:999px;
  margin-top:5px;
  flex:0 0 auto;
}

.toast.bad .ticon{ background:var(--bad); box-shadow:0 0 0 4px rgba(239,68,68,.18); }
.toast.ok .ticon{ background:var(--ok); box-shadow:0 0 0 4px rgba(34,197,94,.18); }
.toast.info .ticon{ background:var(--accent); box-shadow:0 0 0 4px rgba(96,165,250,.18); }

.toast .ttext{
  font-size:13px;
  line-height:1.3;
  color:rgba(255,255,255,.94);
  flex:1;
}

.toast .tclose{
  border:0;
  background:transparent;
  color:rgba(255,255,255,.72);
  cursor:pointer;
  font-size:16px;
  line-height:1;
  padding:0;
}

.loginModal[hidden]{ display:none; }
.loginModal{
  position:fixed;
  inset:0;
  z-index:1200;
}

.loginModalBackdrop{
  position:absolute;
  inset:0;
  background:rgba(4,10,22,.62);
  backdrop-filter:blur(8px);
}

.loginModalCard{
  position:relative;
  width:min(460px, calc(100vw - 32px));
  margin:12vh auto 0;
  padding:24px 24px 20px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(180deg, rgba(21,31,52,.96), rgba(12,18,32,.96));
  box-shadow:0 24px 54px rgba(0,0,0,.42);
}

.loginModalClose{
  position:absolute;
  top:14px;
  right:14px;
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:rgba(255,255,255,.76);
  cursor:pointer;
}

.loginModalBadge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(96,165,250,.14);
  border:1px solid rgba(96,165,250,.22);
  color:rgba(191,219,254,.95);
  font-size:12px;
  margin-bottom:14px;
}

.loginModalTitle{
  margin:0 0 10px;
  font-size:24px;
  line-height:1.15;
}

.loginModalText{
  margin:0 0 10px;
  color:rgba(255,255,255,.74);
  line-height:1.45;
}

.loginModalActions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  margin-top:16px;
}

.loginModalAction{
  width:auto;
  min-width:120px;
}

.loginModalSecondaryAction{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:140px;
  padding:12px 16px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.92);
  text-decoration:none;
  font-weight:700;
}

.primary{
  margin-top:4px;
  width:100%;
  border:0;
  cursor:pointer;
  padding:12px 14px;
  border-radius:16px;
  font-weight:800;
  letter-spacing:.2px;
  color:#08101f;
  background: linear-gradient(90deg, rgba(96,165,250,.96), rgba(59,130,246,.84));
  box-shadow: 0 12px 26px rgba(96,165,250,.18);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

.primary:hover{
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(96,165,250,.20);
}

.primary:active{
  transform: translateY(1px);
}

.primary:focus-visible{
  outline:none;
  box-shadow: 0 16px 34px rgba(96,165,250,.20), var(--ring-strong);
}

.hint{
  margin-top:10px;
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background: rgba(255,255,255,.05);
  border:1px dashed rgba(255,255,255,.12);
  color: var(--muted2);
  font-size:12.5px;
  line-height:1.25;
}

.dot{
  width:8px;
  height:8px;
  border-radius:99px;
  background: rgba(96,165,250,.9);
  margin-top:4px;
  flex:0 0 auto;
}

.footer{
  margin-top:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  color: rgba(255,255,255,.45);
  font-size:12px;
  position:relative;
  z-index:1;
}

.sep{ opacity:.65; }

@media (max-width: 420px){
  .card{ padding:20px 16px 14px; }

  .brand{ gap:12px; }
  .logo-img{
    width:92px;
    transform: translateY(10px);
  }
  .brandName{ font-size:34px; }
}
