/* ============================================================
   auth.css — tela de login/cadastro do Legal Agenda Web + ajustes da
   edição web (Autônomo). NÃO toca no styles.css do desktop, que é
   copiado verbatim para facilitar re-sincronizar melhorias.
   ============================================================ */

/* ---------- enquanto autentica: a página rola, o #app cresce com o conteúdo ---------- */
body.is-auth { overflow: auto; background: #F6F7FB; }
body.is-auth #app { height: auto; min-height: 100%; }

/* Fundo claro com um leve brilho — sóbrio, "premium", nada brega */
.authgrid {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background:
    radial-gradient(1100px 600px at -5% -10%, #EEF0FF 0%, rgba(238,240,255,0) 55%),
    radial-gradient(900px 520px at 105% 110%, #E9ECFF 0%, rgba(233,236,255,0) 55%),
    #F6F7FB;
  color: #16181E;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- coluna esquerda (hero) ---------- */
.authhero {
  padding: 56px clamp(40px, 6vw, 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: #4B4BD6; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, #6E6EE6, #4B4BD6);
  box-shadow: 0 6px 18px rgba(75,75,214,.28);
}
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: -.02em; color: #1B1D24; }

.hero-h1 {
  margin: 6px 0 0;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
  font-weight: 600;               /* peso 600 — "letra gorda envelhece mal" */
  letter-spacing: -.025em;
  color: #16181E;
}
.hero-sub {
  margin: 0;
  max-width: 30em;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.55;
  color: #565C6B;
}
.hero-trust {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 6px; color: #6B7180; font-size: 13px; max-width: 34em;
}
.hero-trust svg { color: #16A34A; flex: none; }

/* mini-preview do painel "Hoje" — mostra a riqueza sem prometer o que não há */
.pv {
  margin-top: 8px;
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #E7E9F2;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16,18,28,.04), 0 20px 44px rgba(16,18,28,.10);
  padding: 16px 16px 8px;
}
.pv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pv-day { font-weight: 600; font-size: 13.5px; color: #2A2E39; }
.pv-badge { font-size: 11.5px; font-weight: 600; color: #DC2626; background: #FDECEC; padding: 3px 9px; border-radius: 99px; }
.pv-item { display: flex; align-items: flex-start; gap: 11px; padding: 10px 4px; border-top: 1px solid #F1F2F7; }
.pv-item:first-of-type { border-top: 0; }
.pv-dot { width: 9px; height: 9px; border-radius: 99px; margin-top: 5px; flex: none; }
.pv-dot.is-prazo { background: #DC2626; } .pv-dot.is-aud { background: #7C3AED; } .pv-dot.is-reu { background: #2563EB; }
.pv-t { font-size: 13.5px; font-weight: 600; color: #22262F; }
.pv-s { font-size: 12px; color: #7A8090; margin-top: 2px; }

/* ---------- coluna direita (painel de auth) ---------- */
.authpanel {
  background: #fff;
  border-left: 1px solid #ECEDF3;
  padding: clamp(40px, 5vw, 72px) clamp(32px, 4.5vw, 72px);
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  box-shadow: -24px 0 60px rgba(16,18,28,.05);
}
.brand--panel { display: none; }           /* só aparece no modo empilhado (mobile) */
.brand--panel .brand-mark { width: 38px; height: 38px; border-radius: 11px; }

.authtabs { display: inline-flex; gap: 4px; background: #F2F3F8; padding: 4px; border-radius: 11px; width: max-content; }
.authtabs button {
  border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 600; color: #6B7180;
  padding: 8px 18px; border-radius: 8px; transition: .15s;
}
.authtabs button.is-on { background: #fff; color: #1B1D24; box-shadow: 0 1px 2px rgba(16,18,28,.10); }

.panel-h2 { margin: 4px 0 2px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: #16181E; }

.authform { display: flex; flex-direction: column; gap: 14px; margin-top: 2px; }
.fld { display: flex; flex-direction: column; gap: 7px; }
.fld > span { font-size: 12.5px; font-weight: 600; color: #4A5060; }
.fld input {
  font: inherit; font-size: 14.5px; color: #16181E;
  padding: 12px 14px; border: 1px solid #DEE0EA; border-radius: 10px;
  background: #FBFBFD; transition: border-color .15s, box-shadow .15s;
}
.fld input::placeholder { color: #A7ADBB; }
.fld input:focus { outline: 0; border-color: #6E6EE6; box-shadow: 0 0 0 3px rgba(110,110,230,.16); background: #fff; }

.pwd { position: relative; display: flex; }
.pwd input { flex: 1; padding-right: 44px; }
.pwd-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; cursor: pointer; color: #98A0AE;
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px;
}
.pwd-eye:hover { color: #4A5060; background: #F1F2F7; }

.auth-btn {
  margin-top: 6px; border: 0; cursor: pointer; font: inherit; font-size: 15px; font-weight: 600;
  color: #fff; padding: 13px 18px; border-radius: 11px;
  background: linear-gradient(140deg, #6E6EE6, #4B4BD6);
  box-shadow: 0 8px 22px rgba(75,75,214,.28); transition: filter .15s, transform .05s;
}
.auth-btn:hover { filter: brightness(1.05); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled { opacity: .7; cursor: default; }

.auth-msg { min-height: 18px; font-size: 13px; font-weight: 500; }
.auth-msg.is-err { color: #DC2626; }
.auth-msg.is-ok { color: #16A34A; }

.auth-foot { margin-top: 2px; font-size: 11.5px; color: #9298A6; line-height: 1.5; }

/* ---------- responsivo: empilha (o "problema da tela de login" resolvido) ---------- */
@media (max-width: 900px) {
  .authgrid { grid-template-columns: 1fr; }
  .authhero { display: none; }            /* no estreito, foco total no formulário */
  .authpanel { border-left: 0; box-shadow: none; min-height: 100vh; }
  .brand--panel { display: inline-flex; align-items: center; gap: 10px; color: #4B4BD6; margin-bottom: 4px; }
  .brand--panel .brand-name { font-size: 19px; }
}

/* ============================================================
   Edição WEB Autônomo — oculta só as 2 features "Pro" de raspagem
   (Monitoramento de Partes, Movimentações). Publicações e Outlook
   FICAM visíveis (funcionam via servidor).
   Feito por CSS: o app.js do desktop fica intacto.
   ============================================================ */
.navbtn[data-view="monitoramento"],
.navbtn[data-view="movimentacoes"] { display: none !important; }

/* ============================================================
   Botões compartilhados (onboarding + configurações)
   ============================================================ */
.wbtn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  padding: 9px 16px; border-radius: 10px; transition: filter .15s, background .15s;
}
.wbtn:hover { background: var(--surface-3); }
.wbtn--primary { border: 0; color: #fff; background: linear-gradient(140deg, #6E6EE6, #4B4BD6); box-shadow: 0 6px 16px rgba(75,75,214,.26); }
.wbtn--primary:hover { filter: brightness(1.05); }
.wbtn--ghost { background: transparent; }
.wbtn:disabled { opacity: .55; cursor: default; }
.wbtn:disabled:hover { background: transparent; }
.soon { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 99px; margin-left: 4px; }

/* ============================================================
   Primeiro-acesso guiado (onboarding)
   ============================================================ */
/* Tour por coach-marks: fundo escurecido com "furo" sobre o item + balão */
.tourroot { position: fixed; inset: 0; z-index: 1900; }              /* bloqueia cliques na UI durante o tour */
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px rgba(10,12,20,.60); transition: all .22s cubic-bezier(.4,0,.2,1); pointer-events: none; }
.tour-pop {
  position: fixed; width: min(340px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 15px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35); padding: 18px 18px 14px;
  transition: left .22s ease, top .22s ease;
}
.tour-pop.is-center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)); padding: 26px 26px 18px; }
.tour-h { font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--text); margin-bottom: 7px; }
.tour-p { font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.tour-p b { color: var(--text); font-weight: 600; }
.tour-oabrow { display: flex; gap: 10px; margin-top: 14px; }
.tour-oabrow .fld { flex: 1; }
.tour-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.tour-dots { display: flex; gap: 6px; }
.tour-dot { width: 6px; height: 6px; border-radius: 99px; background: var(--border-2); transition: .2s; }
.tour-dot.is-on { background: var(--accent); width: 18px; }

/* inputs/selects do tour e das configurações — tema-aware */
.tour-oabrow .fld input, .tour-oabrow .fld select,
.wmodal .fld input, .wmodal .fld select {
  font: inherit; font-size: 14px; color: var(--text);
  padding: 10px 12px; border: 1px solid var(--border-2); border-radius: 9px;
  background: var(--surface-2); width: 100%; transition: border-color .15s, box-shadow .15s;
}
.tour-oabrow .fld input:focus, .tour-oabrow .fld select:focus,
.wmodal .fld input:focus, .wmodal .fld select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.tour-oabrow .fld > span, .wmodal .fld > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.tour-oabrow .fld, .wmodal .fld { display: flex; flex-direction: column; gap: 6px; }
.wbtn--sm { padding: 7px 13px; font-size: 12.5px; }
.wbtn--lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.wbtn--lg svg { margin-left: 2px; }

/* ============================================================
   Página inicial pública (landing)
   ============================================================ */
.lp { min-height: 100vh; background:
    radial-gradient(1100px 620px at 50% -12%, #EEF0FF 0%, rgba(238,240,255,0) 60%), #F6F7FB;
  color: #16181E; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.lp-nav { display: flex; align-items: center; justify-content: space-between; padding: 20px clamp(20px, 5vw, 64px); max-width: 1160px; margin: 0 auto; }
.lp-nav-cta { display: flex; gap: 10px; }

.lp-hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; max-width: 1160px; margin: 0 auto; padding: 40px clamp(20px, 5vw, 64px) 56px; }
.lp-tag { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--accent); background: #ECEDFB; padding: 5px 13px; border-radius: 99px; margin-bottom: 18px; }
.lp-hero h1 { margin: 0; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.06; font-weight: 600; letter-spacing: -.03em; color: #14161C; }
.lp-sub { margin: 18px 0 0; max-width: 32em; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.55; color: #565C6B; }
.lp-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.lp-note { margin-top: 14px; font-size: 13px; color: var(--text-3); }
.lp-hero-art { display: flex; justify-content: center; }
.lp-hero-art .pv { width: 100%; max-width: 420px; transform: rotate(1.2deg); }

.lp-feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; max-width: 1160px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px) 20px; }
.lp-feat { background: #fff; border: 1px solid #E7E9F2; border-radius: 16px; padding: 22px 20px; box-shadow: 0 1px 2px rgba(16,18,28,.04), 0 14px 30px rgba(16,18,28,.05); }
.lp-feat-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: #ECEDFB; margin-bottom: 14px; }
.lp-feat h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: #1B1D24; }
.lp-feat p { margin: 0; font-size: 13.5px; line-height: 1.5; color: #5C6270; }

.lp-trust { display: flex; align-items: flex-start; gap: 14px; max-width: 1000px; margin: 40px auto 0; padding: 20px clamp(20px, 5vw, 40px); background: #fff; border: 1px solid #E7E9F2; border-radius: 16px; }
.lp-trust > span { color: #16A34A; flex: none; margin-top: 1px; }
.lp-trust div { font-size: 14px; line-height: 1.55; color: #565C6B; }
.lp-trust b { color: #22262F; font-weight: 600; }

.lp-final { text-align: center; padding: 64px 20px 48px; }
.lp-final h2 { margin: 0 0 22px; font-size: clamp(24px, 3vw, 34px); font-weight: 600; letter-spacing: -.02em; color: #14161C; }

.lp-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; max-width: 1160px; margin: 0 auto; padding: 28px clamp(20px, 5vw, 64px); border-top: 1px solid #E7E9F2; }
.lp-copy { font-size: 12.5px; color: var(--text-3); }

.auth-back { position: fixed; top: 16px; left: 16px; z-index: 5; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); background: rgba(255,255,255,.7); backdrop-filter: blur(6px); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 500; padding: 7px 13px; border-radius: 9px; cursor: pointer; }
.auth-back svg { transform: rotate(180deg); }
.auth-back:hover { color: var(--text); border-color: var(--border-2); }

@media (max-width: 860px) {
  .lp-hero { grid-template-columns: 1fr; gap: 28px; text-align: center; padding-top: 24px; }
  .lp-hero-cta, .lp-hero .lp-tag { justify-content: center; }
  .lp-sub { margin-left: auto; margin-right: auto; }
  .lp-hero-art { order: -1; }
  .lp-hero-art .pv { transform: none; max-width: 380px; }
  .lp-feats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .lp-feats { grid-template-columns: 1fr; }
  .lp-nav { padding: 16px 18px; }
  .lp-nav-cta .wbtn { padding: 8px 13px; font-size: 13px; }
}

/* Menu de conta / perfil (ancorado ao botão da sidebar) */
.acctmenu { position: fixed; z-index: 1600; width: 244px; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: 0 16px 44px rgba(0,0,0,.3); padding: 7px; }
.acct-head { display: flex; align-items: center; gap: 11px; padding: 9px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.acct-av { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(140deg, #6E6EE6, #4B4BD6); flex: none; }
.acct-id { min-width: 0; }
.acct-nm { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-em { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--text); padding: 10px 10px; border-radius: 9px; text-align: left; }
.acct-item:hover { background: var(--surface-2); }
.acct-item--danger { color: var(--danger); }
.acct-item--danger:hover { background: var(--danger); color: #fff; }

/* Switch (toggles de notificação) */
.wswitch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.wswitch input { opacity: 0; width: 0; height: 0; }
.wswitch span { position: absolute; inset: 0; background: var(--surface-3); border-radius: 99px; transition: .2s; cursor: pointer; }
.wswitch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.wswitch input:checked + span { background: var(--accent); }
.wswitch input:checked + span::before { transform: translateX(18px); }

/* Botão de conta na sidebar — lê como "você" (avatar) */
.navbtn--acct { color: #fff; background: linear-gradient(140deg, #6E6EE6, #4B4BD6); }
.navbtn--acct:hover { color: #fff; filter: brightness(1.06); }
.navbtn--acct svg { stroke-width: 2.2; }

/* Central de notificações (sino + painel) */
.notifbell { position: relative; }
.notifbell__badge { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.notifpop { position: fixed; z-index: 1600; width: 320px; max-width: calc(100vw - 20px); max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 48px rgba(0,0,0,.3); padding: 8px; }
.notifpop__h { font-size: 14px; font-weight: 600; color: var(--text); padding: 8px 10px 10px; }
.notifpop__sec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); padding: 10px 10px 6px; }
.notifpop__it { display: flex; align-items: flex-start; gap: 10px; width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left; font: inherit; padding: 9px 10px; border-radius: 9px; }
.notifpop__it:hover { background: var(--surface-2); }
.notifpop__dot { width: 8px; height: 8px; border-radius: 99px; margin-top: 5px; flex: none; }
.notifpop__dot.is-pub { background: var(--accent); }
.notifpop__dot.is-soon { background: var(--warn); }
.notifpop__dot.is-over { background: var(--danger); }
.notifpop__body { min-width: 0; }
.notifpop__t { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notifpop__s { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notifpop__empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 16px; color: var(--text-3); font-size: 13px; }
.notifpop__empty svg { color: var(--ok); }

/* ============================================================
   Configurações de nuvem (modal)
   ============================================================ */
.wscrim { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 24px; background: rgba(12,14,20,.46); backdrop-filter: blur(2px); }
.wmodal {
  width: min(620px, 100%); max-height: 86vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 30px 70px rgba(0,0,0,.4); overflow: hidden;
}
.wmodal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.wmodal-h h3 { margin: 0; display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; color: var(--text); }
.wclose { border: 0; background: transparent; cursor: pointer; color: var(--text-3); font-size: 16px; width: 32px; height: 32px; border-radius: 8px; }
.wclose:hover { color: var(--text); background: var(--surface-2); }
.wmodal-b { padding: 8px 22px 22px; overflow-y: auto; }

.wsec { padding: 18px 0; border-top: 1px solid var(--border); }
.wsec:first-child { border-top: 0; }
.wsec-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: 14px; }
.wsec-h svg { color: var(--accent); }
.wgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wnote { font-size: 13px; color: var(--text-2); margin-top: 12px; }
.wsub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.wrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.wrow:first-child { border-top: 0; }
.wrow b { font-size: 13.5px; font-weight: 600; color: var(--text); }
.wactions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.wfeedback { font-size: 12.5px; font-weight: 500; }
.wfeedback.is-ok { color: var(--ok); }
.wfeedback.is-err { color: var(--danger); }

.wseg { display: inline-flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 11px; }
.wseg button { border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-2); padding: 8px 18px; border-radius: 8px; }
.wseg button.is-on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.14); }

@media (max-width: 560px) {
  .wgrid { grid-template-columns: 1fr; }
  .onbcard { padding: 32px 22px 20px; }
}
