/* =====================================================================
   InfraMap — login / cadastro (layout dividido em dois)
   ===================================================================== */
body.auth{ background:var(--surface); font-size:14px; }
.auth-split{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); min-height:100vh; }

/* ---------- Painel da marca ---------- */
.auth-brand{ position:relative; overflow:hidden; display:flex; flex-direction:column; justify-content:space-between; padding:36px 48px; color:#e8f7ee;
  background:linear-gradient(155deg, #062a18 0%, #0d4a2b 55%, #15803d 100%); }
.auth-brand-bg{ position:absolute; inset:0; pointer-events:none; opacity:.5;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600' fill='none' stroke='%23a7f3c4' stroke-opacity='.35' stroke-width='1.2'%3E%3Cpath d='M-20 420c90-40 150 10 230-20s120-120 210-110 140 70 200 50'/%3E%3Cpath d='M-20 460c90-40 160 20 240-10s120-110 205-100 150 80 195 60'/%3E%3Cpath d='M-20 500c100-40 170 30 250 0s130-100 205-90 150 90 185 70'/%3E%3Cpath d='M-20 380c80-40 140 0 220-30s120-130 215-120 130 60 205 40'/%3E%3Cpath d='M-20 340c80-40 130-10 210-40s125-140 220-130 125 50 210 30'/%3E%3Cellipse cx='420' cy='170' rx='90' ry='55'/%3E%3Cellipse cx='420' cy='170' rx='60' ry='34'/%3E%3Cellipse cx='420' cy='170' rx='30' ry='15'/%3E%3Cellipse cx='120' cy='130' rx='70' ry='40'/%3E%3Cellipse cx='120' cy='130' rx='40' ry='20'/%3E%3C/svg%3E"),
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size:600px 600px, 48px 48px, 48px 48px;
  background-position:center, 0 0, 0 0; }
.auth-brand > *{ position:relative; }
.brand-invert{ color:#fff; }
.brand-invert .brand-mark{ background:#fff; }
.brand-invert .brand-mark svg{ stroke:#15803d; }
.brand-invert .brand-name b{ color:#86efac; }
.auth-brand-copy{ max-width:440px; }
.auth-brand-copy h1{ margin:0 0 14px; font-size:clamp(28px,3vw,40px); line-height:1.12; letter-spacing:-.025em; color:#fff; text-wrap:balance; }
.auth-brand-copy p{ margin:0 0 30px; color:#c4e9d2; font-size:16px; line-height:1.55; text-wrap:pretty; }
.auth-points{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px; }
.auth-points li{ display:flex; align-items:center; gap:12px; font-size:14.5px; color:#e8f7ee; }
.auth-point-ico{ width:34px; height:34px; border-radius:9px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.14); display:flex; align-items:center; justify-content:center; }
.auth-point-ico svg{ width:17px; height:17px; color:#fff; }
.auth-steps{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.auth-steps li{ display:flex; align-items:center; gap:12px; font-size:14.5px; }
.auth-steps span{ width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; border:1.5px solid rgba(255,255,255,.4); font-family:var(--font-mono); font-size:13px; font-weight:600; }
.auth-steps li:first-child span{ background:#fff; color:#15803d; border-color:#fff; }
.auth-brand-foot{ margin:0; font-size:12.5px; color:#8fc9a6; letter-spacing:.02em; }

/* ---------- Lado do formulário ---------- */
.auth-main{ display:flex; flex-direction:column; padding:24px 32px 40px; background:var(--surface); }
.auth-top{ display:flex; justify-content:space-between; align-items:center; }
.auth-back{ display:inline-flex; align-items:center; gap:4px; color:var(--text-muted); text-decoration:none; font-size:13.5px; font-weight:500; padding:4px 8px 4px 4px; border-radius:6px; }
.auth-back svg{ width:16px; height:16px; }
.auth-back:hover{ color:var(--text); background:var(--surface-alt); }
.auth-card{ width:100%; max-width:380px; margin:auto; padding:32px 0; }
.auth-card h2{ margin:0 0 6px; font-size:26px; letter-spacing:-.02em; }
.auth-sub{ margin:0 0 24px; color:var(--text-muted); font-size:14px; }
.auth-sub a{ font-weight:500; text-decoration:none; }
.auth-sub a:hover{ text-decoration:underline; }
.auth-card .alert{ margin-bottom:16px; }
.auth-card .btn-lg{ margin-top:6px; }
.auth-secondary{ margin-top:8px; }
.auth-hint{ margin-top:14px; text-align:center; }
.auth-done-ico{ width:48px; height:48px; border-radius:12px; background:var(--accent-soft); color:var(--accent); display:flex; align-items:center; justify-content:center; margin-bottom:18px; }
.auth-done-ico svg{ width:24px; height:24px; }

.field-row{ display:flex; justify-content:space-between; align-items:baseline; }
.field-row label{ font-size:12.5px; font-weight:500; color:var(--text-muted); }
.link-btn{ border:none; background:none; padding:0; color:var(--accent); font-size:12.5px; font-weight:500; }
.link-btn:hover{ text-decoration:underline; }
.auth .input{ min-height:40px; font-size:14px; }
.input-wrap{ position:relative; }
.input-wrap .input{ padding-right:40px; }
.input-eye{ position:absolute; right:4px; top:50%; transform:translateY(-50%); width:32px; height:32px; border:none; background:transparent; color:var(--text-faint); border-radius:6px; display:flex; align-items:center; justify-content:center; }
.input-eye:hover{ color:var(--text); background:var(--surface-alt); }
.input-eye svg{ width:17px; height:17px; }

.strength{ display:grid; grid-template-columns:repeat(4,1fr); gap:4px; margin-top:4px; }
.strength span{ height:4px; border-radius:2px; background:var(--border); transition:background .2s; }
.strength small{ grid-column:1 / -1; font-size:12px; color:var(--text-faint); }
.strength[data-nivel="1"] span:nth-child(-n+1){ background:var(--danger); }
.strength[data-nivel="2"] span:nth-child(-n+2){ background:var(--warning); }
.strength[data-nivel="3"] span:nth-child(-n+3){ background:var(--accent); }
.strength[data-nivel="4"] span:nth-child(-n+4){ background:var(--success); }

@media (max-width: 860px){
  .auth-split{ grid-template-columns:1fr; }
  .auth-brand{ padding:22px 16px 26px; min-height:auto; gap:18px; }
  .auth-brand-copy h1{ font-size:24px; margin-bottom:8px; }
  .auth-brand-copy p{ margin-bottom:0; font-size:14.5px; }
  .auth-points,.auth-steps,.auth-brand-foot{ display:none; }
  .auth-main{ padding:16px 16px 32px; }
  .auth-card{ margin:8px auto 0; padding:16px 0; }
}

/* ---------- Página de convite ---------- */
.invite-org{ display:flex; align-items:center; gap:14px; padding:16px; margin-bottom:18px; border:1px solid var(--border); border-radius:12px; background:var(--surface-alt); }
.invite-org small{ display:block; font-size:12px; color:var(--text-muted); }
.invite-org h2{ margin:0 0 2px; font-size:20px; line-height:1.2; overflow-wrap:anywhere; }
.invite-h{ margin-bottom:6px !important; }
.invite-who{ margin:18px 0 0; font-size:12.5px; color:var(--text-muted); text-align:center; }
.invite-who .link-btn{ font-size:12.5px; }
.auth-done-ico.is-warn{ background:var(--warning-soft); color:var(--warning); }
.auth-card .alert{ margin-bottom:16px; }
.auth-invite-note{ margin:-8px 0 18px; }
