/* =====================================================================
   Auth pages (login / forgot password / reset password)
   Same look as the App Customer Center pages (Inter + the --sp-* tokens
   from css/sales_performance.css, repeated here so the page stands alone).
   Everything is scoped under body.auth-page. The JS hooks used by
   js/login.js and the reset view (#login_form, #login_btn, .btn-block,
   #msg_area, .login-error, #send_email_form, #send_email_btn,
   #reset_password_form, #reset_btn) are untouched.
   ===================================================================== */
:root{
  --sp-green-700:#2d7a51; --sp-green-500:#5fa881; --sp-green-400:#7eb395; --sp-green-200:#bde0cd; --sp-green-50:#e9f6ef;
  --sp-red:#CC353B; --sp-red-50:#fdecea;
  --sp-ink:#1d2935; --sp-ink-soft:#566275; --sp-muted:#8c98a8;
  --sp-line:#e6ecf2; --sp-bg:#f4f7fa;
  /* brand accent (#f57f20, the brand orange) - Chixter overrides it from the view */
  --auth-accent:#f57f20;
  --auth-accent-dark:#d96a0f;
  --auth-accent-soft:rgba(245,127,32,.18);
  --auth-brand-a:#1a1310;
  --auth-brand-b:#3b2314;
  --auth-brand-c:#f57f20;
}

html.h-100, body.auth-page{ height:auto; min-height:100%; }
body.auth-page{
  margin:0; min-height:100vh;
  font-family:'Inter','Segoe UI',Roboto,Helvetica,Arial,sans-serif; font-size:14px;
  color:var(--sp-ink); background:var(--sp-bg);
  -webkit-font-smoothing:antialiased;
}
body.auth-page *{ box-sizing:border-box; }
body.auth-page a{ color:var(--auth-accent-dark); text-decoration:none; font-weight:600; }
body.auth-page a:hover{ color:var(--auth-accent); text-decoration:underline; }

/* ---- Layout: brand panel | form panel ---- */
.auth-shell{ min-height:100vh; display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); }

.auth-brand{
  position:relative; overflow:hidden; color:#fff;
  padding:48px 56px; display:flex; flex-direction:column; justify-content:space-between;
  background:linear-gradient(160deg,var(--auth-brand-a) 0%,var(--auth-brand-b) 55%,var(--auth-brand-c) 140%);
}
.auth-brand.has-image{ background-size:cover; background-position:center; }
.auth-brand.has-image::before{ content:""; position:absolute; inset:0; background:linear-gradient(160deg,rgba(18,12,9,.88) 0%,rgba(42,26,16,.72) 60%,rgba(245,127,32,.55) 140%); }
.auth-brand::after{
  content:""; position:absolute; right:-140px; bottom:-160px; width:520px; height:520px; border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.16),rgba(255,255,255,0) 70%); pointer-events:none;
}
.auth-brand .orb{ position:absolute; border-radius:50%; pointer-events:none; filter:blur(2px); }
.auth-brand .orb-1{ width:260px; height:260px; left:-90px; top:-90px; background:radial-gradient(circle,rgba(255,255,255,.14),rgba(255,255,255,0) 70%); }
.auth-brand .orb-2{ width:180px; height:180px; right:14%; top:18%; background:radial-gradient(circle,rgba(255,255,255,.10),rgba(255,255,255,0) 70%); }
.auth-brand > *{ position:relative; z-index:1; }

.auth-brand .brand-pill{
  display:inline-flex; align-items:center; gap:8px; align-self:flex-start;
  font-size:11px; font-weight:700; letter-spacing:2px; text-transform:uppercase;
  padding:8px 14px; border-radius:999px; border:1px solid rgba(255,255,255,.22); background:rgba(255,255,255,.08);
}
.auth-brand .brand-pill i{ font-size:11px; opacity:.85; }
.auth-brand .brand-copy{ max-width:520px; margin:auto 0; padding:48px 0; }
.auth-brand .brand-copy h2{ font-size:40px; line-height:1.1; font-weight:800; letter-spacing:-1px; margin:0 0 16px; }
.auth-brand .brand-copy p{ font-size:16px; line-height:1.6; color:rgba(255,255,255,.78); margin:0; }
.auth-brand .brand-points{ display:flex; gap:10px; flex-wrap:wrap; margin-top:26px; }
.auth-brand .brand-points span{
  font-size:12.5px; font-weight:600; padding:8px 12px; border-radius:10px;
  background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.14);
}
.auth-brand .brand-points span i{ margin-right:6px; opacity:.85; }
.auth-brand .brand-foot{ font-size:12px; color:rgba(255,255,255,.6); }

.auth-panel{ display:flex; align-items:center; justify-content:center; padding:48px 24px; background:#fff; }
.auth-card{ width:100%; max-width:400px; }
.auth-logo{ display:flex; align-items:center; }
.auth-logo img{ height:60px; width:auto; max-width:200px; object-fit:contain; }
.auth-card h1{ font-size:26px; font-weight:800; letter-spacing:-.5px; margin:30px 0 6px; color:var(--sp-ink); }
.auth-card .sub{ color:var(--sp-muted); font-size:14px; margin:0 0 26px; line-height:1.5; }

/* ---- Fields ---- */
.auth-field{ margin-bottom:16px; }
.auth-field label.auth-label{ display:block; font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--sp-ink-soft); margin:0 0 7px; }
.auth-input{ position:relative; }
.auth-input > i{ position:absolute; left:15px; top:50%; transform:translateY(-50%); color:var(--sp-muted); font-size:14px; pointer-events:none; transition:color .15s; }
.auth-input:focus-within > i{ color:var(--auth-accent); }
body.auth-page .auth-input .form-control{
  height:48px; border-radius:12px; border:1px solid var(--sp-line); background:#fafcfd;
  padding:0 44px 0 44px; font-size:14px; color:var(--sp-ink); box-shadow:none; transition:border-color .15s, box-shadow .15s, background .15s;
}
body.auth-page .auth-input .form-control::placeholder{ color:#a7b1be; }
body.auth-page .auth-input .form-control:focus{ background:#fff; border-color:var(--auth-accent); box-shadow:0 0 0 4px var(--auth-accent-soft); outline:none; }
body.auth-page .auth-input .form-control.error{ border-color:var(--sp-red); background:#fff; }
.auth-input .toggle-pw{
  position:absolute; right:8px; top:50%; transform:translateY(-50%); width:34px; height:34px; border:none; border-radius:9px;
  background:transparent; color:var(--sp-muted); cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.auth-input .toggle-pw:hover{ background:var(--sp-bg); color:var(--sp-ink-soft); }
.auth-input .toggle-pw:focus-visible{ outline:none; box-shadow:0 0 0 3px var(--auth-accent-soft); }

/* jquery.validate messages (label.error from app.css, re-themed) */
body.auth-page label.error{ display:block; margin:7px 0 0; font-size:12.5px; font-weight:500; color:var(--sp-red); }

.auth-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 20px; font-size:13px; }

/* ---- Button ---- */
body.auth-page .btn.btn-primary{
  height:48px; border-radius:12px; font-weight:700; font-size:14.5px; letter-spacing:.2px;
  background:var(--auth-accent) !important; border-color:var(--auth-accent) !important; color:#fff !important;
  box-shadow:0 8px 18px -8px var(--auth-accent); transition:transform .12s, box-shadow .12s, background .15s;
}
body.auth-page .btn.btn-primary:hover{ background:var(--auth-accent-dark) !important; border-color:var(--auth-accent-dark) !important; transform:translateY(-1px); box-shadow:0 12px 22px -10px var(--auth-accent); }
body.auth-page .btn.btn-primary:active{ transform:translateY(0); }
body.auth-page .btn.btn-primary:focus{ box-shadow:0 0 0 4px var(--auth-accent-soft); }
body.auth-page .btn.btn-primary[disabled]{ opacity:.75; transform:none; cursor:progress; }

/* ---- Messages ---- */
body.auth-page #msg_area{ margin-top:18px; }
body.auth-page #msg_area:empty{ margin:0; }
body.auth-page .alert{ border-radius:12px; padding:12px 14px; font-size:13.5px; font-weight:500; border:1px solid transparent; margin:0; }
body.auth-page .alert i{ margin-right:6px; }
body.auth-page .alert-danger{ background:var(--sp-red-50); border-color:#f6c2c5; color:#9f2a30; }
body.auth-page .alert-success{ background:var(--sp-green-50); border-color:var(--sp-green-200); color:var(--sp-green-700); }

.auth-links{ display:flex; justify-content:center; gap:16px; margin-top:22px; font-size:13.5px; }
.auth-links a i{ margin-right:6px; font-size:12px; }
.auth-divider{ height:1px; background:var(--sp-line); margin:24px 0 0; }
.auth-foot{ margin-top:14px; font-size:12px; color:var(--sp-muted); text-align:center; }

/* ---- Responsive ---- */
@media (max-width:980px){
  .auth-shell{ grid-template-columns:1fr; }
  .auth-brand{ padding:26px 24px; min-height:0; }
  .auth-brand .brand-copy{ padding:22px 0 6px; }
  .auth-brand .brand-copy h2{ font-size:26px; letter-spacing:-.5px; margin-bottom:8px; }
  .auth-brand .brand-copy p, .auth-brand .brand-points, .auth-brand .brand-foot{ display:none; }
  .auth-panel{ padding:36px 20px 48px; align-items:flex-start; }
  .auth-card h1{ margin-top:22px; font-size:23px; }
}
@media (max-width:420px){
  .auth-logo img{ height:50px; }
  body.auth-page .auth-input .form-control{ height:46px; }
}
@media (prefers-reduced-motion:reduce){
  body.auth-page .btn.btn-primary, body.auth-page .auth-input .form-control{ transition:none; }
}
