/* =====================================================================
   auth-modern.css — Identidade visual Plaorc para as telas de acesso
   (login, esqueci-senha, signup). Layout de duas colunas + slide.
   Paleta da marca: azul #0066cc + vermelho #dc3545.
   ===================================================================== */
:root{
  --plaorc-blue:#0066cc;
  --plaorc-blue-dark:#0052a3;
  --plaorc-red:#dc3545;
  --navy-900:#0a1226;
  --navy-800:#0f2138;
  --navy-700:#13294a;
  --blue-500:#0066cc;
  --blue-600:#0052a3;
  --sky-400:#3b9eff;
  --auth-ink:#0f172a;
  --auth-muted:#64748b;
  --auth-line:#e6eaf0;
  --auth-field:#f6f8fb;
  --auth-field-focus:#ffffff;
  --auth-danger:#dc3545;
  --auth-radius:14px;
}

/* ---- Reset das restrições do base.html para layout full-bleed ---- */
html body.not-authenticated{
  background:var(--navy-900) !important;
  margin:0 !important;
  padding:0 !important;
  display:block !important;
  min-height:100vh !important;
  font-family:'Inter',system-ui,sans-serif !important;
  -webkit-font-smoothing:antialiased;
}
html body.not-authenticated #main-content.not-authenticated{
  margin:0 !important;
  padding:0 !important;
  min-height:100vh !important;
  max-width:none !important;
  width:100% !important;
  display:block !important;
  background:transparent !important;
  box-shadow:none !important;
  border-radius:0 !important;
  text-align:left !important;
}

.auth-shell{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);
  min-height:100vh;
  color:var(--auth-ink);
}

/* ---------- BRAND PANEL ---------- */
.auth-brand{
  position:relative;
  overflow:hidden;
  padding:56px 60px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  color:#dce7f5;
  background:
    radial-gradient(120% 90% at 10% 6%, rgba(0,102,204,.40), transparent 55%),
    radial-gradient(95% 120% at 100% 100%, rgba(220,53,69,.42), transparent 58%),
    linear-gradient(155deg,var(--navy-800),var(--navy-900));
}
.auth-brand::before{
  content:"";
  position:absolute;inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px);
  background-size:48px 48px;
  -webkit-mask-image:radial-gradient(120% 100% at 30% 20%,#000,transparent 75%);
  mask-image:radial-gradient(120% 100% at 30% 20%,#000,transparent 75%);
  pointer-events:none;
}
.auth-graph{
  position:absolute;
  right:-40px;bottom:60px;
  width:380px;height:200px;
  opacity:.5;
  pointer-events:none;
}
.auth-graph path{
  fill:none;stroke:url(#authStroke);stroke-width:2.5;
  stroke-linecap:round;
  stroke-dasharray:520;stroke-dashoffset:520;
  animation:auth-draw 2.4s 0.5s cubic-bezier(.2,.7,.2,1) forwards;
}
.auth-graph .auth-area{fill:url(#authg);stroke:none;opacity:0;animation:auth-fadein 1.2s 1.8s forwards}
@keyframes auth-draw{to{stroke-dashoffset:0}}
@keyframes auth-fadein{to{opacity:.35}}

.auth-logo{
  position:relative;z-index:2;
  display:flex;align-items:center;gap:12px;
  font-family:'Plus Jakarta Sans',sans-serif;font-weight:800;
  font-size:22px;letter-spacing:-.02em;color:#fff;
}
.auth-logo-mark{
  width:46px;height:46px;border-radius:12px;
  display:grid;place-items:center;
  background:#fff;overflow:hidden;
  box-shadow:0 8px 24px -8px rgba(0,102,204,.8);
}
.auth-logo-mark img{width:34px;height:34px;object-fit:contain}
.auth-logo small{font-weight:500;color:var(--sky-400);font-size:13px;letter-spacing:.04em}

.auth-brand-copy{position:relative;z-index:2;max-width:420px}
.auth-brand-copy h1{
  font-family:'Plus Jakarta Sans',sans-serif;font-weight:700;
  font-size:clamp(28px,3.2vw,40px);line-height:1.12;
  letter-spacing:-.025em;color:#fff;margin-bottom:16px;
}
.auth-brand-copy p{font-size:16px;line-height:1.6;color:#a9bdd8}

.auth-brand-list{position:relative;z-index:2;display:flex;flex-direction:column;gap:16px;margin:0;padding:0}
.auth-brand-list li{display:flex;align-items:center;gap:13px;list-style:none;font-size:14.5px;color:#c6d5ea}
.auth-tick{
  flex:none;width:26px;height:26px;border-radius:8px;
  display:grid;place-items:center;
  background:rgba(59,158,255,.16);border:1px solid rgba(59,158,255,.35);
}
.auth-tick svg{width:13px;height:13px;stroke:var(--sky-400)}

/* ---------- FORM PANEL ---------- */
.auth-form-wrap{
  background:#ffffff;
  display:flex;align-items:center;justify-content:center;
  padding:48px 40px;
}
.auth-card{width:100%;max-width:380px}
.auth-card--wide{max-width:420px}

.auth-head{margin-bottom:32px}
.auth-head .auth-eyebrow{
  font-size:12.5px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;
  color:var(--blue-500);margin-bottom:10px;
}
.auth-head h2{
  font-family:'Plus Jakarta Sans',sans-serif;font-weight:700;font-size:27px;
  letter-spacing:-.02em;margin-bottom:6px;color:var(--auth-ink);
}
.auth-head p{color:var(--auth-muted);font-size:15px;margin:0}

.auth-alert{
  background:#fee;color:#c53030;border-left:4px solid #c53030;
  border-radius:10px;padding:12px 14px;font-size:13.5px;margin-bottom:18px;
  display:flex;align-items:flex-start;gap:8px;line-height:1.45;
}
.auth-alert--info{background:#eef5ff;color:#1d4e89;border-left-color:var(--plaorc-blue)}
.auth-alert--warning{background:#fffbeb;color:#92400e;border-left-color:#d97706}

.auth-field{margin-bottom:18px}
.auth-field label{
  display:block;font-size:13px;font-weight:600;
  color:#334155;margin-bottom:7px;
}
.auth-input{
  position:relative;display:flex;align-items:center;
  background:var(--auth-field);
  border:1.5px solid var(--auth-line);
  border-radius:var(--auth-radius);
  transition:border-color .18s,background .18s,box-shadow .18s;
}
.auth-input:focus-within{
  background:var(--auth-field-focus);
  border-color:var(--blue-500);
  box-shadow:0 0 0 4px rgba(0,102,204,.12);
}
.auth-input.has-error{border-color:var(--auth-danger)}
.auth-input .auth-lead{display:grid;place-items:center;width:46px;flex:none}
.auth-input .auth-lead svg{width:18px;height:18px;stroke:#94a3b8;transition:stroke .18s}
.auth-input:focus-within .auth-lead svg{stroke:var(--blue-500)}
.auth-input input{
  flex:1;border:0;background:transparent;outline:0;
  padding:13px 8px 13px 0;font-size:15px;font-family:inherit;color:var(--auth-ink);
  width:100%;
}
.auth-input input::placeholder{color:#9aa6b8}
.auth-toggle{
  border:0;background:transparent;cursor:pointer;
  width:44px;height:44px;display:grid;place-items:center;color:#94a3b8;
  border-radius:10px;
}
.auth-toggle:hover{color:var(--blue-500)}
.auth-toggle svg{width:19px;height:19px;stroke:currentColor;fill:none}

.auth-field-error{color:var(--auth-danger);font-size:12.5px;margin-top:6px}

.auth-row{
  display:flex;align-items:center;justify-content:flex-end;
  margin:4px 0 24px;font-size:13.5px;
}
.auth-link{color:var(--blue-500);text-decoration:none;font-weight:600;background:none;border:0;cursor:pointer;font-family:inherit;font-size:inherit;padding:0}
.auth-link:hover{text-decoration:underline;color:var(--blue-600)}

.auth-btn{
  width:100%;border:0;cursor:pointer;font-family:inherit;
  font-weight:600;font-size:15px;border-radius:var(--auth-radius);
  display:flex;align-items:center;justify-content:center;gap:9px;
  text-decoration:none;
  transition:transform .12s,box-shadow .2s,background .2s;
}
.auth-btn:active{transform:translateY(1px)}
.auth-btn-primary{
  padding:14px;color:#fff;
  background:linear-gradient(135deg,var(--plaorc-blue) 0%,var(--plaorc-red) 100%);
  box-shadow:0 12px 26px -10px rgba(0,102,204,.6);
}
.auth-btn-primary:hover{box-shadow:0 16px 32px -10px rgba(220,53,69,.6);color:#fff;transform:translateY(-1px)}
.auth-btn-primary svg{width:18px;height:18px}

.auth-divider{display:flex;align-items:center;gap:14px;margin:22px 0;color:#94a3b8;font-size:12.5px}
.auth-divider::before,.auth-divider::after{content:"";flex:1;height:1px;background:var(--auth-line)}

.auth-btn-secondary{
  padding:13px;color:var(--blue-600);
  background:#fff;border:1.5px solid var(--auth-line);
}
.auth-btn-secondary:hover{border-color:var(--blue-500);background:#f8faff;color:var(--blue-600)}
.auth-btn-secondary svg{width:17px;height:17px;stroke:currentColor;fill:none}

.auth-foot{margin-top:28px;text-align:center;font-size:12.5px;color:#94a3b8}

/* ---------- SLIDE (login <-> esqueci senha) ---------- */
.auth-slider{position:relative}
.auth-slide{transition:transform .5s cubic-bezier(.65,0,.25,1),opacity .35s ease}
.auth-slide--forgot{position:absolute;inset:0;transform:translateX(36px);opacity:0;pointer-events:none}
.auth-slider.show-forgot .auth-slide--login{transform:translateX(-36px);opacity:0;pointer-events:none}
.auth-slider.show-forgot .auth-slide--forgot{transform:translateX(0);opacity:1;pointer-events:auto}

/* ---------- SIGNUP (form rolável) ---------- */
.auth-scroll{
  max-height:calc(100vh - 220px);
  overflow-y:auto;overflow-x:hidden;
  padding-right:10px;margin-right:-10px;
}
.auth-scroll::-webkit-scrollbar{width:6px}
.auth-scroll::-webkit-scrollbar-track{background:transparent}
.auth-scroll::-webkit-scrollbar-thumb{background:#d6dde7;border-radius:3px}
.auth-scroll::-webkit-scrollbar-thumb:hover{background:#b4bfcd}

.auth-pwreq{
  background:#f6f8fb;border-left:3px solid var(--plaorc-blue);
  padding:12px 14px;margin-top:10px;border-radius:8px;font-size:12.5px;color:#475569;
}
.auth-pwreq-item{display:flex;align-items:center;gap:8px;margin:5px 0}
.auth-pwreq-item .ico{width:16px;text-align:center;font-weight:700;color:#adb5bd}
.auth-pwreq-item.ok .ico{color:#2f855a}
.auth-pwmatch{display:block;margin-top:6px;font-size:12.5px}

/* ---------- entrada (fade-in escalonado) ---------- */
.auth-anim>*{opacity:0;transform:translateY(8px);animation:auth-rise .55s ease forwards}
.auth-anim>*:nth-child(1){animation-delay:.05s}
.auth-anim>*:nth-child(2){animation-delay:.10s}
.auth-anim>*:nth-child(3){animation-delay:.15s}
.auth-anim>*:nth-child(4){animation-delay:.20s}
.auth-anim>*:nth-child(5){animation-delay:.25s}
.auth-anim>*:nth-child(6){animation-delay:.30s}
.auth-anim>*:nth-child(7){animation-delay:.35s}
.auth-anim>*:nth-child(8){animation-delay:.40s}
@keyframes auth-rise{to{opacity:1;transform:none}}

/* ---------- RESPONSIVO ---------- */
@media (max-width:880px){
  .auth-shell{grid-template-columns:1fr}
  .auth-brand{padding:32px 28px;min-height:auto}
  .auth-brand-copy,.auth-brand-list{display:none}
  .auth-graph{display:none}
  .auth-form-wrap{padding:40px 24px}
  .auth-scroll{max-height:none;overflow:visible;padding-right:0;margin-right:0}
}

@media (prefers-reduced-motion:reduce){
  .auth-shell *{animation:none !important}
  .auth-slide{transition:none !important}
  .auth-graph path{stroke-dashoffset:0}
  .auth-graph .auth-area{opacity:.35}
  .auth-anim>*{opacity:1;transform:none}
}
