@font-face{font-family:"Inter";src:url("/fonts/inter.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap;}
@font-face{font-family:"Fraunces";src:url("/fonts/fraunces.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap;}

/* ===== shared.css -- Fac2Gold common styles ===== */

:root{
  --font-body:"Inter",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --font-display:"Fraunces",Georgia,"Times New Roman",serif;
  --bg:#f6f7f9;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --accent:#ef4444;
  --accent2:#fb7185;
  --shadow:0 10px 30px rgba(17,24,39,.06);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: var(--font-body);
  background:var(--bg);
  color:var(--text);
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
h1{ font-family: var(--font-display); }

/* ===== Site header ===== */
.siteHeader{
  position:sticky;
  top:0;
  z-index:100;
  background:var(--bg);
  border-bottom:1px solid var(--line);
}
.siteHeaderInner{
  max-width:1100px;
  margin:0 auto;
  padding:10px 16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.brand{display:flex;align-items:center;gap:10px;flex-wrap:wrap;cursor:pointer;}
.brand b{font-size:22px;letter-spacing:-.02em}
.logo{
  width:40px;height:40px;border-radius:14px;
  background:linear-gradient(135deg,var(--accent),var(--accent2) 60%,#f59e0b);
  display:grid;place-items:center;
  color:#fff;font-weight:900;
  box-shadow:var(--shadow);
}
.pill{font-size:12px;color:var(--muted);border:1px solid var(--line);background:#fff;padding:6px 10px;border-radius:999px;font-weight:800;}
.pill.accent{background:var(--accent);color:#fff;border-color:var(--accent);}
.smallBtn{border:1px solid var(--line);background:#fff;padding:6px 12px;border-radius:10px;font-weight:800;font-size:11px;cursor:pointer;}
.wrap{width:100%;max-width:1100px;margin:0 auto;padding:18px 16px;display:flex;flex-direction:column;gap:14px;flex:1;}
.miniLoader{width:12px;height:12px;border-radius:999px;border:2px solid rgba(17,24,39,.18);border-top-color:#111827;display:inline-block;animation:spin .75s linear infinite;vertical-align:middle;}
.hidden{display:none!important;}
@keyframes spin{to{transform:rotate(360deg)}}
/* Puntos suspensivos animados para estados "Procesando" */
@keyframes dots-anim{
  0%,24%   { content:""; }
  25%,49%  { content:"."; }
  50%,74%  { content:".."; }
  75%,100% { content:"..."; }
}
.dots::after{
  content:"";
  display:inline-block;
  min-width:1.2em;
  text-align:left;
  animation:dots-anim 1.2s steps(4,end) infinite;
}

/* ===== Footer ===== */
.footer{max-width:1100px;width:100%;margin:auto auto 0;padding:18px 16px 28px;color:var(--muted);font-size:12px;}
.footerInner{border-top:1px solid var(--line);padding-top:14px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.footerLinks{display:flex;gap:12px;flex-wrap:wrap;}
.footerLinks a{color:var(--muted);text-decoration:none;font-weight:800;}
.footerLinks a:hover{text-decoration:underline;}

/* ===== Responsive mobile header ===== */
@media (max-width: 768px) {
  .siteHeaderInner {
    flex-wrap: wrap;
    gap: 6px;
  }
  #auth-header-btns,
  #user-header-info {
    flex-wrap: wrap;
    gap: 4px !important;
    justify-content: flex-end;
  }
  #auth-header-btns a,
  #auth-header-btns button,
  #user-header-info a,
  #user-header-info button,
  #user-header-info .pill {
    font-size: 11px !important;
  }
  #user-header-info {
    gap: 4px !important;
  }
}

/* ===== Button feedback ===== */
button, .btn, .planBtn, .bigbtn, .process, .smallBtn, .authSubmit, .authSocialBtn {
  transition: transform 0.1s ease, opacity 0.1s ease, box-shadow 0.1s ease;
}
button:hover, .btn:hover, .planBtn:hover, .bigbtn:hover, .process:hover, .smallBtn:hover, .authSubmit:hover, .authSocialBtn:hover {
  opacity: 0.9;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
button:active, .btn:active, .planBtn:active, .bigbtn:active, .process:active, .smallBtn:active, .authSubmit:active, .authSocialBtn:active {
  transform: scale(0.97);
  opacity: 0.85;
}
button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Accesibilidad: foco visible global (constitution.md VIII.1) =====
   Cualquier elemento interactivo navegado por teclado muestra outline rojo
   de 2px con offset. !important justificado porque hay decenas de
   "outline:none" inline en formularios e inputs (style="outline:none")
   imposibles de neutralizar por especificidad sin tocar uno a uno.
   focus-visible solo dispara con navegación por teclado, no por click. */
:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px !important;
  border-radius: 4px;
}

/* ===== Pricing sheet (bottom drawer) ===== */
body.noScroll{ overflow:hidden; }
.pricingSheet{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(17,24,39,0);
  visibility: hidden;
  pointer-events: none;
  transition: background .2s ease, visibility 0s linear .2s;
  z-index: 9998;
}
.pricingSheet.on{
  visibility: visible;
  pointer-events: auto;
  background: rgba(17,24,39,.55);
  transition: background .2s ease, visibility 0s;
}
.pricingPanel{
  width: min(920px, 100%);
  height: 92vh;
  max-height: 92svh;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--line);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow);
  overflow: auto;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
  padding: 0 12px 18px;
}
.pricingSheet.on .pricingPanel{
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .pricingSheet, .pricingPanel{ transition: none !important; }
}
@media (max-width: 560px){
  .pricingPanel{ height: 94svh; max-height: 94svh; }
}
.pricingHandle{
  width:46px;
  height:5px;
  border-radius:999px;
  background:#e5e7eb;
  margin:4px auto 0;
}
.pricingTop{
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  margin: 0 -12px;
  padding-right: 18px;
}
.pricingTop b{ justify-self: start; }
.pricingTopTitle{
  justify-self: center;
  text-align: center;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -.01em;
}
#closePricing{ justify-self: end; }

/* ===== Plan grid ===== */
.planGrid{
  width: 100%;
  max-width: 860px;
  margin: 12px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.agencyToggle{
  display:flex;
  gap:6px;
  margin-bottom:10px;
}
.agencyToggle button{
  flex:1;
  padding:5px 8px;
  border:1px solid var(--line);
  background:#f9fafb;
  border-radius:8px;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
  color:var(--muted);
  line-height:1;
}
.agencyToggle button.active{
  border-color:var(--accent);
  background:#fff1f2;
  color:var(--accent);
}
.planCard{
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 260px;
}
.planCard.featured{
  border: 2px solid var(--accent);
  box-shadow: 0 20px 40px rgba(239, 68, 68, 0.10);
  position: relative;
}
.planBadge{
  position: absolute;
  top: -12px;
  right: 16px;
  background: var(--accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
}
.planName{ font-size: 16px; font-weight: 900; margin: 0; min-height: 34px; display:flex; align-items:center; }
.planPrice{
  margin: 10px 0 6px;
  font-size: 28px;
  font-weight: 900;
}
.planPrice small{
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
}
.planCredits{
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.planBullets{
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  flex: 1 1 auto;
}
.planBtn{
  width: 100%;
  margin-top: auto;
  border: 0;
  padding: 12px;
  font-weight: 900;
  border-radius: 14px;
  cursor: pointer;
  font-family: var(--font-display);
}
.planBtn.dark{ background: var(--text); color: #fff; }
.planBtn.accent{ background: var(--accent); color: #fff; }
.planHint{
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 800px){
  .planGrid{ grid-template-columns: 1fr; }
}

/* ===== Pricing extras ===== */
.pricingMore{
  width: 100%;
  max-width: 860px;
  margin: 22px auto 0;
  padding: 0 6px 12px;
}
.pricingGrid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}
.pricingCard{
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 14px;
}
.pricingCard h3{
  margin: 0 0 8px;
  font-size: 14px;
}
.pricingCard p,
.pricingCard li{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.pricingCard ul{
  margin: 0;
  padding-left: 18px;
}
.pricingFAQ{
  margin-top: 12px;
  border: 1px solid var(--line);
  background: #f9fafb;
  border-radius: 16px;
  padding: 10px 12px;
}
.pricingFAQ details{ padding: 6px 0; }
.pricingFAQ summary{
  cursor: pointer;
  font-weight: 900;
  font-size: 13px;
}
.pricingFAQ p{ margin: 8px 0 0; color: var(--muted); font-size: 13px; }
@media (max-width: 700px){
  .pricingGrid{ grid-template-columns: 1fr; }
}
/* ===== Billing toggle (monthly/annual) ===== */
.billingToggle{
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}
.billingToggle button{
  padding: 8px 18px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.billingToggle button.active{
  background: #fff;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.saveBadge{
  background: #dcfce7;
  color: #16a34a;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
}
/* Spec 001: badge tipo_lote en jobs.html (Mis trabajos). Mismo patrón visual
   que .saveBadge para coherencia con el resto del sistema. */
.badge-tipo{
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: .01em;
}
.badge-emitida{
  background: #dcfce7;
  color: #15803d;
}
.badge-recibida{
  background: #dbeafe;
  color: #1d4ed8;
}

#pricing-section{
  margin-top: 0;
  border-top: 0;
  padding-top: 16px;
}
