/* ── FACTURA FÁCIL — AUTH STYLES (solar theme, v2 Poppins) ── */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
img{max-width:100%;display:block}
a{text-decoration:none;color:inherit}
ul,ol{list-style:none}
button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}

/* solar palette + tokens */
[data-theme="solar"]{
  --hero-bg:       #faf8f5;
  --hero-bg2:      #f5f0ea;
  --accent:        #d62828;
  --accent-hover:  #b91c1c;
  --accent-glow:   rgba(214,40,40,0.18);
  --accent-subtle: rgba(214,40,40,0.08);
  --text:          #111827;
  --text-sub:      #4b5563;
  --text-muted:    #6b7280;
  --badge-bg:      rgba(214,40,40,0.06);
  --badge-border:  rgba(214,40,40,0.18);
  --card-bg:       #ffffff;
  --card-border:   #e5e7eb;
  --card-shadow:   0 24px 60px -20px rgba(17,24,39,0.18), 0 6px 18px rgba(17,24,39,0.06);
  --orb1:          rgba(214,40,40,0.10);
  --orb2:          rgba(251,191,36,0.14);
  --orb3:          rgba(249,115,22,0.12);
  --dot-color:     rgba(0,0,0,0.045);
  --input-bg:      #ffffff;
  --input-border:  #d1d5db;
  --input-focus:   rgba(214,40,40,0.18);
  --radius-card:   20px;
  --radius-input:  11px;
  --radius-button: 12px;
}

html,body{height:100%}
body{
  font-family:'Poppins',sans-serif;
  font-size:16px;
  color:var(--text);
  background:var(--hero-bg);
  line-height:1.55;
  overflow-x:hidden;
  min-height:100vh;
  display:flex;flex-direction:column;
}

/* ── TOP NAVBAR ─────────────────────────────────────── */
.auth-nav{
  height:68px;flex:0 0 auto;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 5%;
  background:rgba(250,248,245,0.86);
  backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);
  border-bottom:1px solid var(--badge-border);
  position:sticky;top:0;z-index:50;
}
.auth-nav__logo img{height:48px;width:auto;display:block}
.auth-nav__right{display:flex;align-items:center;gap:.85rem}
.auth-nav__hint{font-size:.875rem;color:var(--text-muted)}
.auth-nav__cta{
  font-family:'Poppins',sans-serif;
  font-size:.875rem;font-weight:600;
  padding:.55rem 1.25rem;border-radius:10px;
  background:var(--accent);color:#fff;
  transition:all .2s ease;
  box-shadow:0 4px 14px var(--accent-glow);
}
.auth-nav__cta:hover{background:var(--accent-hover);transform:translateY(-1px);box-shadow:0 8px 22px var(--accent-glow)}
.auth-nav__cta--ghost{
  background:transparent;color:var(--text);
  border:1.5px solid var(--card-border);box-shadow:none;
}
.auth-nav__cta--ghost:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-subtle);box-shadow:none}

/* ── SPLIT LAYOUT ───────────────────────────────────── */
.auth{
  flex:1 1 auto;
  display:grid;
  grid-template-columns:1.05fr .95fr;
  min-height:calc(100vh - 68px);
}

/* ── LEFT (marketing panel) ─────────────────────────── */
.auth__left{
  position:relative;
  background:linear-gradient(165deg, #f5f0ea 0%, #f7e7e5 100%);
  background:linear-gradient(165deg, var(--hero-bg2) 0%, #f7e7e5 100%);
  padding:3.5rem 4.5rem 3rem;
  display:flex;flex-direction:column;justify-content:space-between;
  overflow:hidden;
  border-right:1px solid var(--badge-border);
}
.auth__orbs{
  position:absolute;inset:0;pointer-events:none;z-index:0;
  background:
    radial-gradient(ellipse 60% 70% at 85% 30%, var(--orb1), transparent 65%),
    radial-gradient(ellipse 55% 60% at 10% 90%, var(--orb2), transparent 65%),
    radial-gradient(ellipse 35% 40% at 50% 5%, var(--orb3), transparent 70%);
  animation:meshFloat 14s ease-in-out infinite alternate;
}
@keyframes meshFloat{0%{transform:scale(1) translate(0,0)}100%{transform:scale(1.06) translate(1%,.6%)}}
.auth__dots{
  position:absolute;inset:0;pointer-events:none;z-index:0;
  background-image:radial-gradient(var(--dot-color) 1px, transparent 1px);
  background-size:28px 28px;
  -webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,.6),rgba(0,0,0,1) 30%,rgba(0,0,0,1) 70%,rgba(0,0,0,.4));
  mask-image:linear-gradient(180deg,rgba(0,0,0,.6),rgba(0,0,0,1) 30%,rgba(0,0,0,1) 70%,rgba(0,0,0,.4));
}
.auth__stripe,.auth__stripe2{position:absolute;pointer-events:none;z-index:1}
.auth__stripe{
  top:-200px;right:18%;width:2px;height:130%;
  background:linear-gradient(180deg,transparent,var(--accent-glow) 50%,transparent);
  transform:rotate(12deg);
}
.auth__stripe2{
  top:-200px;right:28%;width:1px;height:130%;
  background:linear-gradient(180deg,transparent,var(--badge-border) 50%,transparent);
  transform:rotate(12deg);
}

.auth__brand{position:relative;z-index:2;max-width:520px}
.auth__badge{
  display:inline-flex;align-items:center;gap:.5rem;
  padding:.4rem .9rem;border-radius:50px;
  background:var(--badge-bg);border:1px solid var(--badge-border);
  color:var(--accent);font-size:.78rem;font-weight:600;letter-spacing:.04em;
  margin-bottom:1.5rem;
}
.auth__h1{
  font-family:'Space Grotesk',sans-serif;
  font-size:clamp(2.2rem, 3.3vw, 3.4rem);
  font-weight:700;line-height:1.05;letter-spacing:-.025em;
  color:var(--text);margin-bottom:1.1rem;text-wrap:balance;
}
.auth__h1 em{
  font-style:normal;
  background:linear-gradient(135deg,var(--accent),#e45d1b);
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;
}
.auth__sub{
  font-size:1.02rem;color:var(--text-sub);line-height:1.7;
  max-width:460px;margin-bottom:2rem;font-weight:300;
}
.auth__bullets{display:flex;flex-direction:column;gap:.55rem;margin-top:1.5rem}
.auth__bullets li{
  display:flex;align-items:center;gap:.7rem;
  font-size:.92rem;color:var(--text-sub);font-weight:400;
}
.auth__bullets li i{
  flex-shrink:0;width:28px;height:28px;border-radius:8px;
  background:var(--accent-subtle);color:var(--accent);
  display:flex;align-items:center;justify-content:center;font-size:.78rem;
}

.auth__quote{
  position:relative;z-index:2;
  max-width:460px;padding:1.1rem 1.2rem;border-radius:14px;
  background:rgba(255,255,255,0.65);border:1px solid var(--badge-border);
  backdrop-filter:blur(6px);
}
.auth__stars{color:#f59e0b;letter-spacing:-2px;font-size:.95rem;display:block;margin-bottom:.3rem}
.auth__quote p{font-size:.92rem;color:var(--text);line-height:1.55;margin-bottom:.3rem;font-style:italic}
.auth__author{font-size:.78rem;color:var(--text-muted);font-weight:500}

/* mini invoice mockup (login) */
.mini-mock{
  position:relative;z-index:2;
  background:#fff;border-radius:14px;
  box-shadow:0 18px 50px rgba(17,24,39,0.14);
  padding:.85rem 1rem 1rem;margin:1.5rem 0;
  max-width:380px;
  transform:rotate(-1.5deg);
  border:1px solid var(--card-border);
}
.mini-mock__head{display:flex;align-items:center;justify-content:space-between;padding-bottom:.55rem;border-bottom:1px solid #f3f4f6;margin-bottom:.55rem}
.mini-mock__brand{display:flex;align-items:center;gap:.55rem}
.mini-mock__dot{
  width:30px;height:30px;border-radius:7px;background:var(--accent);
  color:#fff;display:flex;align-items:center;justify-content:center;
  font-family:'Space Grotesk',sans-serif;font-weight:800;font-size:.65rem;letter-spacing:-.5px;
}
.mini-mock__co{font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:.8rem;color:#111827}
.mini-mock__cuit{font-family:monospace;font-size:.65rem;color:#9ca3af}
.mini-mock__letra{
  width:32px;height:32px;border:1.5px solid #111827;border-radius:6px;
  display:flex;align-items:center;justify-content:center;
  font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:1.05rem;color:#111827;
}
.mini-mock__row{display:flex;justify-content:space-between;padding:.25rem 0;font-size:.78rem;color:#374151}
.mini-mock__row span:last-child{font-family:monospace;font-weight:600}
.mini-mock__row--total{
  border-top:1px dashed #e5e7eb;margin-top:.3rem;padding-top:.5rem;
  font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:.86rem;color:#111827;
}
.mini-mock__row--total span:last-child{color:var(--accent);font-size:.95rem}
.mini-mock__cae{
  margin-top:.65rem;padding:.55rem .65rem;border-radius:8px;
  background:#f0fdf4;border:1px solid #bbf7d0;
  display:flex;align-items:center;gap:.6rem;
}
.mini-mock__cae i{color:#16a34a;font-size:1rem}
.mini-mock__cae-lbl{font-size:.68rem;font-weight:700;color:#15803d;text-transform:uppercase;letter-spacing:.06em}
.mini-mock__cae-num{font-family:monospace;font-size:.7rem;color:#374151}

/* steps mini (register) */
.steps-mini{display:flex;flex-direction:column;gap:.7rem;margin:1.25rem 0 .5rem;max-width:430px}
.steps-mini li{
  display:flex;align-items:center;gap:.85rem;
  padding:.7rem .9rem;border-radius:12px;
  background:rgba(255,255,255,0.55);border:1px solid var(--badge-border);
  backdrop-filter:blur(4px);
  transition:transform .2s ease, box-shadow .2s ease;
}
.steps-mini li:hover{transform:translateX(4px);box-shadow:0 6px 18px rgba(17,24,39,0.06)}
.steps-mini__num{
  flex-shrink:0;width:34px;height:34px;border-radius:50%;
  background:var(--card-bg);border:2px solid var(--accent);
  color:var(--accent);font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:.9rem;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 0 0 4px var(--accent-subtle);
}
.steps-mini strong{display:block;font-family:'Space Grotesk',sans-serif;font-size:.92rem;font-weight:600;color:var(--text)}
.steps-mini small{font-size:.78rem;color:var(--text-muted)}

/* ── RIGHT (form panel) ─────────────────────────────── */
.auth__right{
  display:flex;align-items:center;justify-content:center;
  padding:3rem 4rem;
  background:var(--hero-bg);
  position:relative;
}
.auth__right::before{
  content:'';position:absolute;inset:0;pointer-events:none;
  background-image:radial-gradient(var(--dot-color) 1px, transparent 1px);
  background-size:32px 32px;opacity:.6;
  -webkit-mask-image:radial-gradient(circle at 50% 40%, transparent 0, rgba(0,0,0,.4) 60%, rgba(0,0,0,1) 100%);
  mask-image:radial-gradient(circle at 50% 40%, transparent 0, rgba(0,0,0,.4) 60%, rgba(0,0,0,1) 100%);
}

.auth__card{
  position:relative;z-index:1;
  width:100%;max-width:440px;
  background:var(--card-bg);
  border:1px solid var(--card-border);
  border-radius:20px;
  box-shadow:var(--card-shadow);
  padding:2.5rem 2.25rem 1.75rem;
}
.auth__card--wide{max-width:520px}
.auth__card-head{margin-bottom:1.5rem}
.auth__eyebrow{
  display:inline-block;font-size:.72rem;font-weight:700;
  letter-spacing:.12em;text-transform:uppercase;color:var(--accent);
  margin-bottom:.6rem;
}
.auth__title{
  font-family:'Space Grotesk',sans-serif;
  font-size:1.85rem;font-weight:700;color:var(--text);
  letter-spacing:-.02em;line-height:1.15;margin-bottom:.45rem;
}
.auth__caption{font-size:.92rem;color:var(--text-muted);line-height:1.55}

.auth__error{
  display:flex;align-items:center;gap:.6rem;
  padding:.75rem .9rem;border-radius:10px;
  background:#fef2f2;border:1px solid #fecaca;color:#b91c1c;
  font-size:.88rem;font-weight:500;margin-bottom:1rem;
}

/* ── FORM CONTROLS ──────────────────────────────────── */
.auth__form{display:flex;flex-direction:column;gap:1.05rem}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.field{display:flex;flex-direction:column;gap:.4rem}
.field__label{
  display:flex;justify-content:space-between;align-items:baseline;
  font-size:.84rem;font-weight:600;color:var(--text);
}
.field__hint{
  font-size:.78rem;font-weight:500;color:var(--accent);
  text-decoration:none;transition:opacity .15s;
}
.field__hint:hover{text-decoration:underline}

.field__wrap{
  position:relative;display:flex;align-items:center;
  background:var(--input-bg);border:1.5px solid var(--input-border);border-radius:11px;
  transition:border-color .15s, box-shadow .15s;
}
.field__wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 4px var(--input-focus)}
.field__icon{
  position:absolute;left:14px;color:var(--text-muted);font-size:.95rem;
  pointer-events:none;
}
.field__wrap input,
.field__wrap select{
  width:100%;
  font-family:'Poppins',sans-serif;font-size:.95rem;color:var(--text);
  background:transparent;border:0;outline:none;
  padding:.85rem 1rem .85rem 2.7rem;
  border-radius:11px;
  -webkit-appearance:none;-moz-appearance:none;appearance:none;
}
.field__wrap input::placeholder{color:#9ca3af}
.field__wrap select{cursor:pointer;color:var(--text)}
.field__wrap select:invalid{color:#9ca3af}
.field__caret{
  position:absolute;right:16px;color:var(--text-muted);
  font-size:.78rem;pointer-events:none;
}
.field__eye{
  position:absolute;right:8px;
  width:36px;height:36px;border-radius:8px;
  display:flex;align-items:center;justify-content:center;
  color:var(--text-muted);font-size:.95rem;
  transition:color .15s, background .15s;
}
.field__eye:hover{color:var(--accent);background:var(--accent-subtle)}
.field__wrap:has(.field__eye) input{padding-right:3rem}
.field__help{font-size:.76rem;color:var(--text-muted);line-height:1.4;padding-left:.15rem}

/* password strength meter */
.pw-meter{display:flex;align-items:center;gap:4px;margin-top:.3rem;flex-wrap:wrap}
.pw-meter span{flex:1 1 0;height:4px;border-radius:3px;background:#e5e7eb;transition:background .25s}
.pw-meter__lbl{
  flex:1 1 100%;font-style:normal;font-size:.74rem;color:var(--text-muted);
  margin-top:.25rem;
}
.pw-meter__lbl strong{font-weight:600}

/* checkbox */
.check{
  display:inline-flex;align-items:center;gap:.55rem;
  font-size:.86rem;color:var(--text-sub);cursor:pointer;
  user-select:none;line-height:1.45;
}
.check--block{display:flex;align-items:flex-start;padding:.3rem 0}
.check input{position:absolute;opacity:0;pointer-events:none}
.check__box{
  flex-shrink:0;width:20px;height:20px;border-radius:6px;
  border:1.5px solid var(--input-border);background:#fff;
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-size:.65rem;
  transition:all .15s;
}
.check input:checked + .check__box{background:var(--accent);border-color:var(--accent)}
.check input:focus-visible + .check__box{box-shadow:0 0 0 4px var(--input-focus)}
.check__box i{opacity:0;transform:scale(.6);transition:all .15s}
.check input:checked + .check__box i{opacity:1;transform:scale(1)}
.check--block .check__box{margin-top:1px}
.check a{color:var(--accent);font-weight:500}
.check a:hover{text-decoration:underline}

.auth__row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem}

/* primary submit */
.btn-primary-lg{
  width:100%;
  font-family:'Space Grotesk',sans-serif;
  font-size:1rem;font-weight:600;letter-spacing:.01em;
  padding:.95rem 1.5rem;border-radius:12px;
  background:var(--accent);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;gap:.6rem;
  box-shadow:0 6px 20px var(--accent-glow);
  transition:all .2s ease;
  position:relative;overflow:hidden;
}
.btn-primary-lg::after{
  content:'';position:absolute;inset:0;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,0.22),transparent);
  transform:translateX(-100%);transition:transform 0s;
}
.btn-primary-lg:hover{background:var(--accent-hover);transform:translateY(-1px);box-shadow:0 12px 30px var(--accent-glow)}
.btn-primary-lg:hover::after{transform:translateX(100%);transition:transform .6s ease}
.btn-primary-lg:active{transform:translateY(0)}

/* google */
.btn-google{
  width:100%;
  font-family:'Poppins',sans-serif;font-size:.92rem;font-weight:500;color:#374151;
  background:#fff;border:1.5px solid var(--card-border);border-radius:12px;
  padding:.78rem 1.5rem;
  display:inline-flex;align-items:center;justify-content:center;gap:.7rem;
  transition:all .15s ease;
}
.btn-google:hover{background:#f9fafb;border-color:#9ca3af;transform:translateY(-1px);box-shadow:0 4px 12px rgba(17,24,39,0.06)}
.btn-google svg{width:18px;height:18px;flex-shrink:0}
.btn-google--top{margin-bottom:.25rem}

/* divider */
.auth__divider{
  display:flex;align-items:center;gap:.85rem;
  color:var(--text-muted);font-size:.78rem;font-weight:500;
  text-transform:uppercase;letter-spacing:.06em;
  margin:.25rem 0;
}
.auth__divider::before,.auth__divider::after{
  content:'';flex:1;height:1px;background:var(--card-border);
}

/* footer line */
.auth__footer-line{
  text-align:center;font-size:.88rem;color:var(--text-muted);
  margin-top:.5rem;
}
.auth__footer-line a{color:var(--accent);font-weight:600}
.auth__footer-line a:hover{text-decoration:underline}

.auth__legal{
  margin-top:1.25rem;padding-top:1.1rem;
  border-top:1px solid var(--card-border);
  text-align:center;font-size:.74rem;color:var(--text-muted);
  display:flex;align-items:center;justify-content:center;gap:.45rem;
}
.auth__legal i{color:#16a34a}

/* OTP boxes */
.otp-box{
  width:60px;height:60px;font-size:28px;text-align:center;font-weight:bold;
  border:1.5px solid var(--input-border);border-radius:11px;margin:0 6px;display:inline-block;
  font-family:'Space Grotesk',sans-serif;background:var(--input-bg);color:var(--text);
  outline:none;transition:border-color .15s, box-shadow .15s;
}
.otp-box:focus{border-color:var(--accent);box-shadow:0 0 0 4px var(--input-focus)}
#otp-wrapper{text-align:center;margin:1.25rem 0}

/* ── MODAL ──────────────────────────────────────────── */
.modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:1rem}
.modal[hidden]{display:none}
.modal__backdrop{
  position:absolute;inset:0;
  background:rgba(17,24,39,0.55);backdrop-filter:blur(4px);
  animation:fadeIn .2s ease;
}
.modal__panel{
  position:relative;
  background:#fff;border-radius:18px;
  width:100%;max-width:440px;padding:2rem 1.85rem 1.75rem;
  box-shadow:0 30px 80px rgba(0,0,0,0.35);
  animation:popUp .25s cubic-bezier(.16,1,.3,1);
}
.modal__panel--tall{max-width:540px}
.modal__panel h3{
  font-family:'Space Grotesk',sans-serif;font-size:1.45rem;font-weight:700;
  color:var(--text);margin:.4rem 0 .5rem;letter-spacing:-.01em;
}
.modal__panel .auth__caption{margin-bottom:1.25rem}
.modal__close{
  position:absolute;top:.85rem;right:.85rem;
  width:36px;height:36px;border-radius:10px;color:var(--text-muted);
  display:flex;align-items:center;justify-content:center;
  transition:background .15s, color .15s;
}
.modal__close:hover{background:#f3f4f6;color:var(--text)}
.modal__body{
  font-size:.9rem;color:var(--text-sub);line-height:1.65;
  margin-bottom:1.25rem;max-height:50vh;overflow-y:auto;
  padding-right:.25rem;
}
.modal__body p{margin-bottom:.75rem}
.modal__body a{color:var(--accent);font-weight:500}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes popUp{from{opacity:0;transform:translateY(20px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}

/* error messages (formValidation / PHP form_error) */
.text-danger{font-size:.78rem;color:#b91c1c;margin-top:.15rem;display:block}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1100px){
  .auth__left{padding:3rem 3rem 2.5rem}
  .auth__right{padding:2.5rem 2.5rem}
}
@media (max-width: 920px){
  .auth{grid-template-columns:1fr}
  .auth__left{
    padding:2.5rem 1.5rem 2rem;
    min-height:auto;
    border-right:0;border-bottom:1px solid var(--badge-border);
  }
  .auth__brand{margin:0 auto}
  .auth__quote{margin:1.5rem auto 0}
  .mini-mock{margin:1.25rem auto}
  .steps-mini{margin:1rem auto .5rem}
  .auth__right{padding:2rem 1.25rem 3rem;align-items:flex-start}
  .auth__card{margin-top:0}
  .auth__h1{font-size:2rem;text-align:center}
  .auth__sub{text-align:center;margin-inline:auto}
  .auth__badge{display:inline-flex;margin-left:auto;margin-right:auto;text-align:center}
  .auth__brand{text-align:center;display:flex;flex-direction:column;align-items:center}
  .auth__bullets{align-items:flex-start;max-width:380px;margin-inline:auto}
}
@media (max-width: 560px){
  .auth-nav{padding:0 1.25rem}
  .auth-nav__hint{display:none}
  .auth__left{padding:2rem 1.25rem 1.5rem}
  .auth__right{padding:1.5rem 1.25rem 2.5rem}
  .auth__card{padding:1.75rem 1.5rem 1.5rem;border-radius:16px}
  .auth__title{font-size:1.55rem}
  .auth__h1{font-size:1.75rem}
  .grid-2{grid-template-columns:1fr}
}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:0.01ms !important;transition-duration:0.01ms !important}
}
