/* Auth / signup / reset — mismo lenguaje visual premium que la landing */
body.auth-body{min-height:100vh;display:flex;}
.auth-shell{display:grid;grid-template-columns:1fr 1fr;min-height:100vh;width:100%;}

.auth-brand{
  background:var(--bg);color:var(--text);
  padding:56px;display:flex;flex-direction:column;justify-content:space-between;
  position:relative;overflow:hidden;
}
.auth-brand::before{
  content:"";position:absolute;inset:0;
  background:
    radial-gradient(circle at 18% 12%, rgba(201,162,39,0.14), transparent 42%),
    radial-gradient(circle at 90% 80%, rgba(28,71,80,0.55), transparent 48%);
  pointer-events:none;
}
.auth-brand-top{display:flex;align-items:center;justify-content:space-between;position:relative;z-index:1;}
.auth-quote-block{max-width:420px;position:relative;z-index:1;}
.auth-eyebrow{font-family:var(--font-mono);font-size:0.78rem;color:var(--brass-bright);letter-spacing:0.08em;margin-bottom:18px;}
.auth-headline{font-family:var(--font-display);font-weight:500;font-size:clamp(1.8rem,2.6vw,2.5rem);line-height:1.12;margin:0 0 18px;letter-spacing:-0.02em;}
.auth-headline em{font-style:italic;color:var(--brass-bright);}
.auth-sub{color:var(--text-muted);font-size:1rem;margin:0;}

.auth-mini-entry{
  margin-top:40px;
  background:linear-gradient(165deg, color-mix(in srgb, var(--surface-2) 40%, var(--surface)), var(--surface));
  border:1px solid color-mix(in srgb, var(--border) 70%, rgba(201,162,39,0.28));
  border-radius:calc(var(--radius) + 2px);
  padding:20px 22px;max-width:400px;
  box-shadow:0 16px 40px rgba(0,0,0,0.18);
}
.auth-mini-entry .label{font-family:var(--font-mono);font-size:0.72rem;color:var(--text-muted);letter-spacing:0.06em;margin-bottom:12px;}
.auth-mini-entry .row{display:flex;justify-content:space-between;font-size:0.88rem;padding:5px 0;border-bottom:1px dashed var(--border);color:var(--text);}
.auth-mini-entry .row:last-child{border-bottom:none;}
.auth-mini-entry .row b{font-weight:700;}
.auth-brand-foot{font-family:var(--font-mono);font-size:0.78rem;color:var(--text-muted);position:relative;z-index:1;}

.auth-form-side{
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(201,162,39,0.06), transparent 50%),
    var(--surface-2);
  display:flex;align-items:center;justify-content:center;padding:56px;
}
.auth-card{width:100%;max-width:400px;}
.auth-card h1{font-family:var(--font-display);font-size:1.9rem;font-weight:500;margin:0 0 8px;letter-spacing:-0.02em;color:var(--text);}
.auth-card .sub{color:var(--text-muted);font-size:0.95rem;margin:0 0 32px;}

.auth-form-side .field label{color:var(--text);}
.auth-form-side .field input,
.auth-form-side .field select,
.auth-form-side .field textarea{
  background:var(--surface);color:var(--text);border-color:var(--border-strong);
}
.auth-form-side .subdomain-wrap{background:var(--surface);border-color:var(--border-strong);}
.auth-form-side .subdomain-wrap span{color:var(--text-muted);background:var(--bg);}
.auth-form-side .form-note{color:var(--text-muted);}

.visually-hidden{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
.tenant-choice{
  display:flex;align-items:flex-start;gap:10px;
  margin:0 0 12px;padding:12px 14px;
  border:1px solid var(--border-strong);border-radius:12px;
  background:var(--surface);cursor:pointer;
}
.tenant-choice:has(input:checked){
  border-color:var(--brass);
  box-shadow:0 0 0 1px color-mix(in srgb, var(--brass) 45%, transparent);
}
.tenant-choice input{margin-top:3px;flex-shrink:0;}

/* Volver al inicio */
.auth-home-bar{
  display:flex;justify-content:flex-start;margin-bottom:28px;
}
.auth-home-link{
  display:inline-flex;align-items:center;gap:8px;
  font-family:var(--font-body);font-size:0.88rem;font-weight:600;
  color:var(--text-muted);text-decoration:none;
  padding:8px 12px 8px 10px;border-radius:999px;
  border:1px solid var(--border-strong);
  background:color-mix(in srgb, var(--surface) 70%, transparent);
  transition:color .2s ease, border-color .2s ease, background .2s ease;
}
.auth-home-link svg{width:16px;height:16px;flex-shrink:0;opacity:0.9;}
.auth-home-link:hover{
  color:var(--brass-bright);
  border-color:color-mix(in srgb, var(--brass) 45%, var(--border-strong));
  background:color-mix(in srgb, var(--brass) 10%, var(--surface));
}
.reset-card .auth-home-bar{margin-bottom:22px;}
.reset-card .auth-home-link{
  background:color-mix(in srgb, var(--bg) 55%, transparent);
}

/* Password show / hide */
.password-wrap{
  position:relative;display:flex;align-items:stretch;
}
.password-wrap input{
  width:100%;
  padding-right:48px;
}
.password-toggle{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  width:36px;height:36px;padding:0;margin:0;
  border:none;border-radius:var(--radius-sm);
  background:transparent;color:var(--text-muted);
  cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;
  transition:color .2s ease, background .2s ease;
}
.password-toggle:hover{
  color:var(--brass-bright);
  background:color-mix(in srgb, var(--brass) 12%, transparent);
}
.password-toggle:focus-visible{
  outline:2px solid var(--brass-bright);outline-offset:2px;
}
.password-toggle svg{width:18px;height:18px;display:block;}
.password-toggle .icon-eye-off{display:none;}
.password-wrap.is-visible .password-toggle .icon-eye{display:none;}
.password-wrap.is-visible .password-toggle .icon-eye-off{display:block;}
.auth-form-side .password-toggle{color:var(--text-muted);}
.reset-shell .password-toggle{color:var(--text-muted);}

.auth-row-inline{display:flex;justify-content:space-between;align-items:center;font-size:0.85rem;margin:2px 0 22px;gap:12px;flex-wrap:wrap;}
.remember{display:flex;align-items:center;gap:8px;color:var(--text-muted);}
.remember input{accent-color:var(--brass);}
.forgot-link{color:var(--brass-bright);text-decoration:none;font-weight:600;}
.forgot-link:hover{text-decoration:underline;}

.auth-switch{text-align:center;font-size:0.92rem;color:var(--text-muted);margin-top:8px;}
.auth-switch a{color:var(--brass-bright);font-weight:700;text-decoration:none;}
.auth-switch a:hover{text-decoration:underline;}
.auth-logout-form{display:inline;margin:0;}
.auth-logout-btn{
  border:0;background:transparent;padding:0;margin:0;cursor:pointer;
  color:var(--brass-bright);font-weight:700;font:inherit;text-decoration:none;
}
.auth-logout-btn:hover{text-decoration:underline;}
.auth-logout-btn:focus-visible{outline:2px solid var(--brass);outline-offset:2px;}

.form-error{
  background:var(--burgundy);color:var(--burgundy-soft);border-radius:var(--radius-sm);
  padding:10px 14px;font-size:0.85rem;margin-bottom:18px;
}

.auth-flash-list{display:flex;flex-direction:column;gap:10px;margin:0 0 20px;}
.auth-flash{
  margin:0;padding:12px 14px;border-radius:var(--radius-sm);font-size:0.9rem;line-height:1.45;
  border:1px solid var(--border);
}
.auth-flash-success{
  background:color-mix(in srgb, var(--brass) 18%, var(--surface));
  color:var(--text);border-color:color-mix(in srgb, var(--brass) 45%, var(--border));
}
.auth-flash-warning,.auth-flash-error{
  background:color-mix(in srgb, var(--burgundy) 22%, var(--surface));
  color:var(--text);border-color:color-mix(in srgb, var(--burgundy) 50%, var(--border));
}

/* Reset password — misma familia visual */
.reset-shell{
  min-height:100vh;display:flex;align-items:center;justify-content:center;
  background:var(--surface-2);padding:24px;
}
.reset-card{
  background:var(--surface);color:var(--text);border:1px solid var(--border);
  border-radius:var(--radius);padding:40px;max-width:400px;width:100%;
}
.reset-card .brand{margin-bottom:28px;}
.reset-card h1{font-family:var(--font-display);font-size:1.6rem;margin:0 0 8px;color:var(--text);}
.reset-card > p{color:var(--text-muted);font-size:0.92rem;margin:0 0 26px;}
.reset-shell .field label{color:var(--text);}
.reset-shell .field input{
  background:var(--bg);color:var(--text);border-color:var(--border-strong);
}
.reset-card .auth-steps{
  margin:0 0 24px;padding-left:1.2rem;color:var(--text-muted);font-size:0.92rem;
  line-height:1.45;
}
.reset-card .auth-steps li{margin-bottom:8px;}
.reset-card .auth-switch{text-align:center;font-size:0.9rem;}
.reset-card .mt-md{margin-top:16px;}

@media (max-width:900px){
  .auth-shell{grid-template-columns:1fr;}
  .auth-brand{display:none;}
  .auth-form-side{padding:32px 20px;width:100%;}
  .auth-card h1{font-size:1.55rem;}
}
