.lag-form-wrapper,
.lag-form-wrapper *{
  box-sizing:border-box;
}

.lag-form-wrapper{
  max-width:920px;
  margin:24px auto;
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
}

.lag-form{
  width:100%;
  margin:0;
  padding:28px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  box-shadow:none;
}

.lag-form h3{
  margin:0 0 12px;
  font-size:2rem;
  line-height:1.15;
  font-weight:700;
  color:#111827;
}

.lag-form-intro,
.lag-form-note,
.lag-form-section-note{
  margin:0 0 12px;
  font-size:0.98rem;
  line-height:1.65;
  color:#4b5563;
}

.lag-form-note{
  margin-bottom:18px;
}

.lag-form-section-title{
  margin:20px 0 8px;
  padding:0;
  border:0;
  font-size:1.25rem;
  line-height:1.3;
  font-weight:700;
  color:#111827;
}

.lag-form-readiness,
.lag-form-wizard__progress,
.lag-form-step-helper{
  display:none !important;
}

.lag-form-error-global{
  display:none;
  margin:0 0 16px;
  padding:12px 14px;
  border:1px solid #fecaca;
  border-radius:8px;
  background:#fff;
  color:#991b1b;
  font-size:0.92rem;
  line-height:1.5;
}

.lag-form-error-global:not(:empty){
  display:block;
}

.lag-form-wizard{
  margin-top:20px;
}

.lag-form-wizard__steps{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 20px;
}

.lag-form-wizard__step{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border:1px solid #d1d5db;
  border-radius:8px;
  background:#fff;
  color:#111827;
  font:inherit;
  line-height:1.2;
  cursor:pointer;
  box-shadow:none;
}

.lag-form-wizard__step-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:999px;
  border:1px solid #d1d5db;
  background:#fff;
  font-size:0.82rem;
  font-weight:600;
  color:#374151;
}

.lag-form-wizard__step-label{
  font-size:0.95rem;
  font-weight:600;
}

.lag-form-wizard__step.is-active{
  border-color:#111827;
}

.lag-form-wizard__step.is-active .lag-form-wizard__step-number,
.lag-form-wizard__step.is-complete .lag-form-wizard__step-number{
  border-color:#111827;
  background:#111827;
  color:#fff;
}

.lag-form-step-panel[hidden],
.lag-form-accordion-panel[hidden],
.lag-progress[hidden]{
  display:none !important;
}

.lag-form-step-panel{
  margin:0;
  padding:0;
  border:0;
  background:transparent;
}

.lag-form-section-card,
.lag-industry-templates,
.lag-form-accordion,
.lag-form-review,
.lag-form-submit-panel,
.lag-admin-advanced{
  margin:0 0 20px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.lag-industry-templates__header{
  margin:0 0 12px;
}

.lag-industry-templates__header strong{
  display:block;
  margin:0 0 4px;
  font-size:1rem;
  color:#111827;
}

.lag-field-hint-inline,
.lag-form .lag-field-hint,
.lag-form .lag-field-group__hint{
  margin:6px 0 0;
  font-size:0.92rem;
  line-height:1.55;
  color:#6b7280;
}

.lag-form label,
.lag-form .lag-field{
  display:block;
  width:100%;
  margin:0 0 18px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  font-size:0.98rem;
  line-height:1.45;
  font-weight:600;
  color:#111827;
}

.lag-form label.lag-col-6,
.lag-form label.lag-col-12,
.lag-form label.lag-field-key,
.lag-form label.lag-field-key-main,
.lag-form label.lag-field-key-secondary{
  width:100%;
  max-width:none;
}

.lag-form input[type=text],
.lag-form input[type=email],
.lag-form input[type=number],
.lag-form select,
.lag-form textarea,
.lag-chips-input{
  display:block;
  width:100%;
  margin-top:8px;
  padding:11px 12px;
  border:1px solid #d1d5db;
  border-radius:8px;
  background:#fff;
  color:#111827;
  font:inherit;
  line-height:1.4;
  box-shadow:none;
}

.lag-form textarea{
  min-height:108px;
  resize:vertical;
}

.lag-form select{
  appearance:auto;
}

.lag-form input::placeholder,
.lag-form textarea::placeholder{
  color:#9ca3af;
}

.lag-form input:focus,
.lag-form select:focus,
.lag-form textarea:focus,
.lag-chips-input:focus{
  outline:0;
  border-color:#111827;
  box-shadow:0 0 0 1px #111827;
}

.lag-char-counter,
.lag-item-counter{
  display:block;
  margin-top:6px;
  text-align:right;
  font-size:0.82rem;
  color:#6b7280;
  font-weight:400;
}

.lag-char-counter.is-over,
.lag-item-counter.is-over{
  color:#b91c1c;
}


.lag-char-counter.is-low,
.lag-item-counter.is-low{
  color:#92400e;
}

.lag-char-counter.is-good,
.lag-item-counter.is-good{
  color:#374151;
}

.lag-form-quality-panel{
  margin:18px 0 0;
  padding:14px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
  color:#111827;
}

.lag-form-quality-panel__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 6px;
}

.lag-form-quality-panel__head strong{
  display:block;
  font-size:0.98rem;
  font-weight:700;
  color:#111827;
}

.lag-form-quality-panel__badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 8px;
  border:1px solid #d1d5db;
  border-radius:999px;
  background:#fff;
  color:#374151;
  font-size:0.78rem;
  line-height:1.2;
  font-weight:600;
  white-space:nowrap;
}

.lag-form-quality-panel__desc{
  margin:0;
  color:#4b5563;
  font-size:0.92rem;
  line-height:1.5;
  font-weight:400;
}

.lag-form-quality-panel__list{
  margin:10px 0 0 18px;
  padding:0;
  color:#4b5563;
  font-size:0.9rem;
  line-height:1.5;
  font-weight:400;
}

.lag-form-quality-panel__list li{
  margin:4px 0;
}

.lag-form-quality-panel.has-warning{
  border-color:#fcd34d;
}

.lag-form-quality-panel.has-warning .lag-form-quality-panel__badge{
  border-color:#fcd34d;
  color:#92400e;
}

.lag-form-quality-panel.has-error{
  border-color:#fecaca;
}

.lag-form-quality-panel.has-error .lag-form-quality-panel__badge{
  border-color:#fecaca;
  color:#991b1b;
}

.lag-form-quality-panel.is-ready .lag-form-quality-panel__badge{
  border-color:#d1d5db;
  color:#374151;
}

.lag-form .lag-field-error{
  margin:6px 0 0;
  font-size:0.88rem;
  line-height:1.45;
  color:#b91c1c;
  font-weight:400;
}

.lag-form .lag-field-hint--template{
  margin-top:8px;
  padding:8px 10px;
  border-left:3px solid var(--lag-accent, #06b6d4);
  border-radius:8px;
  background:#f8fafc;
  color:#334155;
}

.lag-form input.is-invalid,
.lag-form textarea.is-invalid,
.lag-form select.is-invalid,
.lag-chips-input.is-invalid{
  border-color:#b91c1c;
  box-shadow:0 0 0 1px #b91c1c;
}

.lag-form input.is-valid,
.lag-form textarea.is-valid,
.lag-form select.is-valid{
  border-color:#9ca3af;
  box-shadow:none;
}

.lag-industry-template-select-wrap{
  display:block;
  margin:0 0 8px;
  padding:0;
  border:0;
  background:transparent;
}

.lag-industry-template-select-label{
  display:block;
  margin:0 0 4px;
  font-size:0.92rem;
  font-weight:600;
  color:#111827;
}

.lag-industry-template-select-hint{
  margin-bottom:10px;
}

.lag-industry-template-preview,
.lag-industry-template-applied-notice,
.lag-form-review{
  padding:14px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
}

.lag-industry-template-preview{
  border-color:#dbe4f0;
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
  box-shadow:0 10px 24px rgba(15,23,42,0.05);
}

.lag-industry-template-preview__head{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin:0 0 8px;
}

.lag-industry-template-preview__eyebrow{
  display:inline-flex;
  width:max-content;
  padding:3px 8px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:0.75rem;
  line-height:1.2;
  font-weight:700;
  letter-spacing:.02em;
}

.lag-industry-template-preview__title,
.lag-form-review__head strong,
.lag-form-submit-panel__copy strong{
  display:block;
  margin:0 0 8px;
  color:#111827;
}

.lag-industry-template-preview__title{
  margin:0;
  font-size:1rem;
  line-height:1.25;
}

.lag-industry-template-preview p,
.lag-form-review__head p,
.lag-form-submit-panel__copy p{
  margin:0 0 8px;
  color:#4b5563;
  line-height:1.55;
  font-weight:400;
}

.lag-industry-template-preview__summary{
  font-size:0.93rem;
}

.lag-industry-template-preview__note{
  margin-top:8px !important;
  padding:9px 10px;
  border-radius:8px;
  background:#f1f5f9;
  color:#475569 !important;
  font-size:0.88rem;
}

.lag-industry-template-preview__badges,
.lag-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:8px 0;
}

.lag-industry-template-preview__details{
  margin-top:10px;
  border-top:1px solid #e5e7eb;
  padding-top:10px;
}

.lag-industry-template-preview__details summary{
  cursor:pointer;
  color:#1d4ed8;
  font-size:0.88rem;
  line-height:1.35;
  font-weight:700;
  list-style-position:inside;
}

.lag-industry-template-preview__details summary:hover,
.lag-industry-template-preview__details summary:focus{
  color:#1e40af;
}

.lag-industry-template-preview__detail-body{
  margin-top:8px;
  padding:10px;
  border-radius:8px;
  background:#ffffff;
  border:1px solid #e5e7eb;
}

.lag-industry-template-preview__detail-body p:last-child{
  margin-bottom:0;
}

.lag-industry-template-preview__detail-body span{
  color:#111827;
  font-weight:700;
}

.lag-industry-template-badge,
.lag-chip,
.lag-form-review__label{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border:1px solid #d1d5db;
  border-radius:999px;
  background:#fff;
  color:#4b5563;
  font-size:0.82rem;
  line-height:1.2;
  font-weight:500;
}

.lag-chips-wrapper,
.lag-field-group{
  margin-top:8px;
}

.lag-chip{
  gap:6px;
}

.lag-chip button,
.lag-chip .lag-chip__remove{
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  color:#6b7280;
  cursor:pointer;
  font:inherit;
}

.lag-field-group{
  display:grid;
  gap:12px;
}

.lag-field-group__item{
  display:block;
}

.lag-field-group__title{
  display:block;
  margin:0 0 4px;
  font-size:0.92rem;
  font-weight:600;
  color:#111827;
}

.lag-form-accordion{
  padding-top:18px;
  border-top:1px solid #e5e7eb;
}

.lag-form-accordion-toggle{
  width:100%;
  padding:0;
  border:0;
  background:transparent;
  text-align:left;
  cursor:pointer;
}

.lag-form-accordion-toggle__title{
  display:block;
  margin:0 0 4px;
  font-size:1rem;
  font-weight:700;
  color:#111827;
}

.lag-form-accordion-toggle__meta{
  display:block;
  font-size:0.92rem;
  font-weight:400;
  color:#6b7280;
}

.lag-form-accordion-panel{
  padding-top:14px;
}

.lag-form-review__grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:12px;
}

.lag-form-review__item{
  padding:12px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fff;
}

.lag-form-review__item.is-missing{
  background:#fafafa;
}

.lag-form-review__label{
  margin-bottom:8px;
}

.lag-form-review__value{
  color:#111827;
  font-size:0.95rem;
  line-height:1.55;
  font-weight:400;
}

.lag-form-review__item.is-missing .lag-form-review__value{
  color:#6b7280;
}

.lag-form-captcha-card{
  display:block;
  margin:18px 0;
  padding-top:18px;
  border-top:1px solid #e5e7eb;
}

.lag-form-captcha-card input{
  max-width:180px;
}

.lag-form-submit-panel{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:12px;
  margin-top:24px;
  padding-top:18px;
  border-top:1px solid #e5e7eb;
}

.lag-form-submit-panel__copy{
  display:none;
}

.lag-form-step-nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin:24px 0 0;
  padding-top:16px;
  border-top:1px solid #e5e7eb;
}

.lag-form-step-btn,
.lag-form .lag-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:10px 16px;
  border:1px solid #111827;
  border-radius:8px;
  background:#111827;
  color:#fff;
  font:inherit;
  font-weight:600;
  line-height:1.2;
  text-decoration:none;
  cursor:pointer;
  box-shadow:none;
}

.lag-form-step-btn--secondary{
  border-color:#d1d5db;
  background:#fff;
  color:#111827;
}

.lag-form-step-btn--primary,
.lag-form .lag-btn{
  margin-left:auto;
}

.lag-form-step-btn:hover,
.lag-form .lag-btn:hover,
.lag-form-step-btn:focus,
.lag-form .lag-btn:focus{
  opacity:1;
  transform:none;
}

.lag-form-step-feedback{
  margin-top:16px;
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:8px;
  background:#fafafa;
  color:#4b5563;
  font-size:0.92rem;
  line-height:1.5;
}

.lag-form-step-feedback.is-error{
  border-color:#fecaca;
  color:#991b1b;
  background:#fff;
}

.lag-form-step-feedback.is-success{
  border-color:#d1d5db;
  color:#374151;
  background:#fff;
}

.lag-admin-advanced{
  margin-top:24px;
  padding-top:18px;
  border-top:1px solid #e5e7eb;
}

.lag-hp{
  position:absolute !important;
  left:-9999px !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
}


.lag-progress{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:9999;
  width:min(420px,calc(100vw - 32px));
  padding:18px;
  border:1px solid rgba(148,163,184,0.28);
  border-radius:16px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
  box-shadow:0 20px 50px rgba(15,23,42,0.20),0 4px 12px rgba(15,23,42,0.08);
  color:#0f172a;
  overflow:hidden;
}

.lag-progress::before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:4px;
  background:linear-gradient(90deg,#111827,#475569,#111827);
  opacity:.95;
}

.lag-progress-close{
  position:absolute;
  top:10px;
  right:10px;
  width:28px;
  height:28px;
  border:0;
  border-radius:999px;
  background:#f1f5f9;
  color:#475569;
  font-size:18px;
  line-height:1;
  cursor:pointer;
  transition:background-color .15s ease, color .15s ease, transform .1s ease;
  display:flex;
  align-items:center;
  justify-content:center;
}

.lag-progress-close:hover{
  background:#e2e8f0;
  color:#0f172a;
  transform:translateY(-1px);
}

.lag-progress-close:focus-visible{
  outline:2px solid #2271b1;
  outline-offset:2px;
}

.lag-progress-close:focus-visible,
.lag-progress-action:focus-visible{
  outline:3px solid rgba(59,130,246,.35);
  outline-offset:2px;
}

.lag-progress-header{
  display:flex;
  align-items:center;
  gap:12px;
  padding-right:34px;
}

.lag-progress-icon{
  position:relative;
  flex:0 0 auto;
  width:42px;
  height:42px;
  border-radius:16px;
  background:#111827;
  box-shadow:0 10px 24px rgba(17,24,39,.22);
}

.lag-progress-icon::before,
.lag-progress-icon::after{
  content:"";
  position:absolute;
  border-radius:999px;
  background:#fff;
}

.lag-progress-icon::before{
  width:16px;
  height:16px;
  left:13px;
  top:13px;
  opacity:.96;
  animation:lag-progress-pulse 1.8s ease-in-out infinite;
}

.lag-progress-icon::after{
  width:6px;
  height:6px;
  right:9px;
  top:9px;
  opacity:.78;
}

.lag-progress-heading{
  min-width:0;
}

.lag-progress-kicker{
  display:block;
  margin-bottom:2px;
  color:#64748b;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.lag-progress-title{
  display:block;
  color:#0f172a;
  font-size:1rem;
  line-height:1.25;
  font-weight:800;
}

.lag-progress-meter{
  margin-top:14px;
}

.lag-progress-track{
  width:100%;
  height:10px;
  border-radius:999px;
  background:#e5e7eb;
  overflow:hidden;
  box-shadow:inset 0 1px 2px rgba(15,23,42,.08);
}

.lag-progress-inner{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#111827 0%,#334155 48%,#0f172a 100%);
  width:0;
  min-width:0;
  transition:width .45s ease;
  box-shadow:0 0 0 1px rgba(255,255,255,.18) inset;
}

.lag-progress-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:9px;
}

.lag-progress-text{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:48px;
  padding:3px 9px;
  border-radius:999px;
  background:#0f172a;
  color:#fff;
  font-size:.78rem;
  font-weight:800;
  line-height:1.3;
}

.lag-progress-elapsed{
  display:block;
  margin:0;
  color:#64748b;
  font-size:.79rem;
  line-height:1.35;
  text-align:right;
}

.lag-progress.is-taking-long .lag-progress-elapsed::after{
  content:" · seguimos trabajando";
}

.lag-progress-msg{
  margin:14px 0 0;
  color:#0f172a;
  font-size:.94rem;
  line-height:1.48;
}

.lag-progress-msg strong{
  display:block;
  margin-top:6px;
  font-size:.96rem;
  line-height:1.35;
}

.lag-progress-stage{
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:max-content;
  max-width:100%;
  padding:4px 9px;
  border:1px solid #dbe3ef;
  border-radius:999px;
  background:#fff;
  color:#475569;
  font-size:.74rem;
  font-weight:800;
  line-height:1.2;
}

.lag-progress-stage::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
  background:#111827;
  box-shadow:0 0 0 5px rgba(17,24,39,.08);
}

.lag-progress-msg-detail,
.lag-progress-msg-note{
  display:block;
  margin-top:5px;
  color:#475569;
  font-size:.88rem;
}

.lag-progress-msg-note{
  padding:9px 10px;
  border:1px solid #e2e8f0;
  border-radius:13px;
  background:rgba(255,255,255,.74);
  color:#64748b;
  line-height:1.42;
}

.lag-progress-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}

.lag-progress-actions[hidden]{
  display:none !important;
}

.lag-progress-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:8px 13px;
  border:1px solid #cbd5e1;
  border-radius:999px;
  background:#fff;
  color:#0f172a;
  font-size:.84rem;
  font-weight:800;
  cursor:pointer;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease;
}

.lag-progress-action:hover{
  border-color:#94a3b8;
  box-shadow:0 8px 18px rgba(15,23,42,.08);
  transform:translateY(-1px);
}

.lag-progress-action:disabled{
  opacity:.55;
  cursor:not-allowed;
  box-shadow:none;
  transform:none;
}

.lag-progress-action--primary{
  border-color:#111827;
  background:#111827;
  color:#fff;
}

.lag-progress-action--secondary{
  border-color:#cbd5e1;
  background:#f8fafc;
}

.lag-progress-action--ghost{
  border-color:transparent;
  color:#475569;
  background:transparent;
}

.lag-progress-msg-success{
  color:#166534;
}

.lag-progress-msg-error{
  color:#991b1b;
}

@keyframes lag-progress-pulse{
  0%,100%{ transform:scale(.72); opacity:.72; }
  50%{ transform:scale(1); opacity:1; }
}

@media (prefers-reduced-motion: reduce){
  .lag-progress-icon::before,
  .lag-progress-inner,
  .lag-progress-close,
  .lag-progress-action{
    animation:none !important;
    transition:none !important;
  }
}


/* ==========================================================
   LAGB Mobile Progress Card Polish - v3.1.4
   Responsive-only refinement for the generation progress card.
   ========================================================== */
@media (max-width: 600px){
  .lag-progress{
    right:10px;
    bottom:calc(10px + env(safe-area-inset-bottom, 0px));
    left:10px;
    width:auto;
    max-height:calc(100dvh - 20px - env(safe-area-inset-bottom, 0px));
    padding:16px;
    border-radius:18px;
    box-sizing:border-box;
    overflow-y:auto;
    overscroll-behavior:contain;
    box-shadow:0 18px 44px rgba(15,23,42,.2),0 2px 8px rgba(15,23,42,.08);
  }

  .lag-progress-close{
    top:8px;
    right:8px;
    width:34px;
    height:34px;
    font-size:20px;
    background:rgba(255,255,255,.88);
  }

  .lag-progress-header{
    align-items:flex-start;
    gap:10px;
    padding-right:38px;
  }

  .lag-progress-icon{
    width:38px;
    height:38px;
    border-radius:14px;
  }

  .lag-progress-icon::before{
    width:14px;
    height:14px;
    left:12px;
    top:12px;
  }

  .lag-progress-icon::after{
    width:5px;
    height:5px;
    right:8px;
    top:8px;
  }

  .lag-progress-kicker{
    font-size:.66rem;
    letter-spacing:.075em;
  }

  .lag-progress-title{
    font-size:.96rem;
    line-height:1.28;
  }

  .lag-progress-meter{
    margin-top:13px;
  }

  .lag-progress-track{
    height:9px;
  }

  .lag-progress-meta{
    align-items:flex-start;
    gap:8px;
    margin-top:8px;
  }

  .lag-progress-text{
    min-width:46px;
    padding:3px 8px;
    font-size:.76rem;
  }

  .lag-progress-elapsed{
    flex:1 1 auto;
    font-size:.76rem;
    text-align:left;
  }

  .lag-progress-msg{
    margin-top:12px;
    font-size:.88rem;
    line-height:1.45;
  }

  .lag-progress-msg strong{
    font-size:.9rem;
  }

  .lag-progress-stage{
    width:100%;
    box-sizing:border-box;
    justify-content:flex-start;
    padding:6px 9px;
    white-space:normal;
    line-height:1.25;
  }

  .lag-progress-msg-detail,
  .lag-progress-msg-note{
    font-size:.82rem;
  }

  .lag-progress-msg-note{
    padding:8px 9px;
    border-radius:12px;
  }

  .lag-progress-actions{
    flex-direction:column;
    gap:8px;
  }

  .lag-progress-action{
    width:100%;
    min-height:44px;
    padding:10px 12px;
    border-radius:12px;
    text-align:center;
  }
}

@media (max-width: 360px){
  .lag-progress{
    right:8px;
    bottom:calc(8px + env(safe-area-inset-bottom, 0px));
    left:8px;
    max-height:calc(100dvh - 16px - env(safe-area-inset-bottom, 0px));
    padding:14px;
    border-radius:16px;
  }

  .lag-progress-header{
    gap:9px;
  }

  .lag-progress-icon{
    width:34px;
    height:34px;
    border-radius:12px;
  }

  .lag-progress-icon::before{
    width:12px;
    height:12px;
    left:11px;
    top:11px;
  }

  .lag-progress-title{
    font-size:.9rem;
  }

  .lag-progress-meta{
    flex-wrap:wrap;
  }

  .lag-progress-elapsed{
    flex-basis:100%;
  }
}

@media (max-width: 782px){
  .lag-form-wrapper{
    margin:16px auto;
  }

  .lag-form{
    padding:18px;
    border-radius:10px;
  }

  .lag-form h3{
    font-size:1.7rem;
  }

  .lag-form-wizard__steps{
    flex-direction:column;
  }

  .lag-form-wizard__step,
  .lag-form-step-btn,
  .lag-form .lag-btn{
    width:100%;
  }

  .lag-form-step-nav,
  .lag-form-submit-panel{
    flex-direction:column-reverse;
    align-items:stretch;
  }

  .lag-form-step-btn--primary,
  .lag-form .lag-btn{
    margin-left:0;
  }

  .lag-form-review__grid{
    grid-template-columns:1fr;
  }
}


/* ==========================================================
   LAGB Form Premium Polish - v2.7.11.14
   Uses existing inline --lag-primary/--lag-accent variables.
   ========================================================== */
.lag-form-wrapper {
  --lag-form-primary: var(--lag-primary, #0f172a);
  --lag-form-accent: var(--lag-accent, #06b6d4);
}

.lag-form {
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}

.lag-form-section-card,
.lag-form-accordion,
.lag-form-review,
.lag-form-submit-panel,
.lag-form-readiness,
.lag-form-wizard__progress {
  border-color: #e5e7eb !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

.lag-form-section-title { color: #111827 !important; letter-spacing: -0.02em; }

.lag-form input[type=text],
.lag-form input[type=email],
.lag-form input[type=number],
.lag-form select,
.lag-form textarea {
  border-color: #d1d5db !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.lag-form input:focus,
.lag-form select:focus,
.lag-form textarea:focus {
  border-color: color-mix(in srgb, var(--lag-form-primary) 45%, #d1d5db 55%) !important;
  outline: 3px solid color-mix(in srgb, var(--lag-form-primary) 16%, transparent) !important;
}

.lag-form-step-btn--primary,
.lag-form .lag-btn {
  background: var(--lag-form-primary) !important;
  border-color: var(--lag-form-primary) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.lag-form-step-btn--primary:hover,
.lag-form .lag-btn:hover,
.lag-form-step-btn--primary:focus,
.lag-form .lag-btn:focus {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12) !important;
  transform: none !important;
}

.lag-form-readiness__bar span,
#lag-form-readiness-bar { background: linear-gradient(90deg, var(--lag-form-primary), var(--lag-form-accent)) !important; }

/* ==========================================================
   LAGB Premium Generator Form Polish - v2.7.11.17
   Styles for the public shortcode form [lag_landing_form].
   ========================================================== */
.lag-form-wrapper {
  max-width: 940px !important;
  margin: 32px auto !important;
  padding: 0 16px !important;
  --lag-form-surface: #ffffff;
  --lag-form-bg-soft: #f8fafc;
  --lag-form-border: #e5e7eb;
  --lag-form-border-strong: #d1d5db;
  --lag-form-text: #111827;
  --lag-form-muted: #4b5563;
  --lag-form-danger: #b91c1c;
  --lag-form-success: #166534;
  --lag-form-shadow-premium: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.lag-form {
  position: relative;
  overflow: hidden;
  padding: 34px !important;
  border: 1px solid var(--lag-form-border) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 74%, #fbfdff 100%) !important;
  box-shadow: var(--lag-form-shadow-premium) !important;
}

.lag-form::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lag-form-primary, #111827), var(--lag-form-accent, #06b6d4));
}

.lag-form h3 {
  max-width: 720px;
  margin: 0 auto 10px !important;
  color: var(--lag-form-text) !important;
  font-size: clamp(1.65rem, 3vw, 2.15rem) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.04em !important;
  text-align: center !important;
}

.lag-form-intro,
.lag-form-note {
  max-width: 720px;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

.lag-form-note {
  margin-bottom: 24px !important;
  color: #6b7280 !important;
  font-size: 0.94rem !important;
}

.lag-form-section-title {
  margin: 24px 0 8px !important;
  color: var(--lag-form-text) !important;
  font-size: 1.08rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
}

.lag-form-section-card,
.lag-industry-templates,
.lag-form-accordion,
.lag-form-review,
.lag-admin-advanced {
  margin-bottom: 18px !important;
}

.lag-form label,
.lag-form .lag-field {
  margin-bottom: 16px !important;
  color: var(--lag-form-text) !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
}

.lag-form input[type=text],
.lag-form input[type=email],
.lag-form input[type=number],
.lag-form select,
.lag-form textarea,
.lag-chips-input {
  min-height: 44px !important;
  margin-top: 7px !important;
  padding: 11px 12px !important;
  border: 1px solid var(--lag-form-border-strong) !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  color: var(--lag-form-text) !important;
  box-shadow: none !important;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease !important;
}

.lag-form textarea { min-height: 104px !important; }

.lag-form input::placeholder,
.lag-form textarea::placeholder { color: #9ca3af !important; }

.lag-form input:focus,
.lag-form select:focus,
.lag-form textarea:focus,
.lag-chips-input:focus {
  border-color: color-mix(in srgb, var(--lag-form-primary, #111827) 48%, var(--lag-form-border-strong) 52%) !important;
  outline: 3px solid color-mix(in srgb, var(--lag-form-primary, #111827) 14%, transparent) !important;
  box-shadow: none !important;
}

.lag-form-error-global:not(:empty),
.lag-form-step-feedback.is-error,
.lag-form .lag-field-error:not(:empty) {
  border-radius: 9px !important;
}

.lag-form-error-global:not(:empty) {
  padding: 12px 14px !important;
  border: 1px solid #fecaca !important;
  background: #fef2f2 !important;
  color: #991b1b !important;
}

.lag-form-step-feedback.is-success {
  border-color: #bbf7d0 !important;
  background: #f0fdf4 !important;
  color: #166534 !important;
}

.lag-form-step-feedback.is-error {
  border-color: #fecaca !important;
  background: #fef2f2 !important;
  color: #991b1b !important;
}

.lag-form-submit-panel {
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin-top: 28px !important;
  padding: 18px !important;
  border: 1px solid var(--lag-form-border) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #ffffff 0%, var(--lag-form-bg-soft) 100%) !important;
}

.lag-form-submit-panel__copy {
  display: block !important;
  max-width: 520px;
}

.lag-form-submit-panel__copy strong {
  margin-bottom: 4px !important;
  color: var(--lag-form-text) !important;
  font-size: 0.98rem !important;
}

.lag-form-submit-panel__copy p {
  margin: 0 !important;
  color: var(--lag-form-muted) !important;
  font-size: 0.9rem !important;
  line-height: 1.55 !important;
}

.lag-form-step-btn,
.lag-form .lag-btn {
  min-height: 44px !important;
  padding: 11px 18px !important;
  border-radius: 9px !important;
  font-weight: 700 !important;
  letter-spacing: -0.006em;
}

.lag-form-step-btn--primary,
.lag-form .lag-btn {
  background: var(--lag-form-primary, #111827) !important;
  border-color: var(--lag-form-primary, #111827) !important;
  color: #ffffff !important;
}

.lag-form-step-btn--secondary {
  background: #ffffff !important;
  border-color: var(--lag-form-border-strong) !important;
  color: var(--lag-form-text) !important;
}

.lag-form-submit-panel::before {
  content: "Revisión automática y generación segura con IA.";
  display: block;
  flex-basis: 100%;
  margin-bottom: -4px;
  color: var(--lag-form-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .lag-form { padding: 24px 18px !important; }
  .lag-form-submit-panel { align-items: stretch !important; }
  .lag-form-step-btn,
  .lag-form .lag-btn { width: 100%; justify-content: center; }
}


/* ==========================================================
   LAGB Form Submit Panel Fix - v2.7.11.18
   Clean enterprise layout for the final generation CTA.
   ========================================================== */
.lag-form-submit-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  justify-content: initial !important;
  column-gap: 28px !important;
  row-gap: 14px !important;
  margin-top: 28px !important;
  padding: 22px 24px !important;
  border: 1px solid var(--lag-form-border, #e5e7eb) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.045) !important;
}

/* Remove the previous pseudo-column that made the panel look unbalanced. */
.lag-form-submit-panel::before {
  content: none !important;
  display: none !important;
}

.lag-form-submit-panel__copy {
  display: block !important;
  max-width: 640px !important;
  min-width: 0 !important;
}

.lag-form-submit-panel__copy strong {
  display: block !important;
  margin: 0 0 6px !important;
  color: var(--lag-form-text, #111827) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: -0.015em !important;
}

.lag-form-submit-panel__copy p {
  margin: 0 !important;
  color: var(--lag-form-muted, #4b5563) !important;
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
}

.lag-form-submit-panel .lag-form-step-btn,
.lag-form-submit-panel .lag-btn,
.lag-form-submit-panel button[type='submit'] {
  width: auto !important;
  min-width: 176px !important;
  max-width: none !important;
  margin-left: 0 !important;
  padding: 12px 22px !important;
  white-space: nowrap !important;
  text-align: center !important;
  justify-self: end !important;
}

@media (max-width: 720px) {
  .lag-form-submit-panel {
    grid-template-columns: 1fr !important;
    padding: 20px 18px !important;
    text-align: center !important;
  }

  .lag-form-submit-panel__copy {
    max-width: none !important;
  }

  .lag-form-submit-panel .lag-form-step-btn,
  .lag-form-submit-panel .lag-btn,
  .lag-form-submit-panel button[type='submit'] {
    width: 100% !important;
    min-width: 0 !important;
    justify-self: stretch !important;
    white-space: normal !important;
  }
}

/* ==========================================================
   LAGB Form Draft Recovery - v2.7.11.71
   Local temporary save controls for safer long-form editing.
   ========================================================== */
.lag-form-draft-tools {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 16px 0 20px !important;
  padding: 14px 16px !important;
  border: 1px solid rgba(6, 182, 212, 0.28) !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(15, 23, 42, 0.025)) !important;
  color: var(--lag-form-text, #111827) !important;
}

.lag-form-draft-tools[hidden] {
  display: none !important;
}

.lag-form-draft-tools__title {
  display: block !important;
  margin: 0 0 3px !important;
  font-size: 0.94rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

.lag-form-draft-tools__desc {
  margin: 0 !important;
  color: var(--lag-form-muted, #4b5563) !important;
  font-size: 0.87rem !important;
  line-height: 1.5 !important;
}

.lag-form-draft-tools__actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

.lag-form-draft-tools__btn {
  appearance: none !important;
  border: 1px solid var(--lag-accent, #06b6d4) !important;
  border-radius: 999px !important;
  background: var(--lag-accent, #06b6d4) !important;
  color: #ffffff !important;
  cursor: pointer !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  padding: 8px 12px !important;
  white-space: nowrap !important;
}

.lag-form-draft-tools__btn--soft {
  background: #ffffff !important;
  color: var(--lag-primary, #0f172a) !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
}

.lag-form-draft-tools__btn--ghost {
  background: transparent !important;
  color: var(--lag-form-muted, #4b5563) !important;
  border-color: transparent !important;
}

@media (max-width: 720px) {
  .lag-form-draft-tools {
    grid-template-columns: 1fr !important;
  }

  .lag-form-draft-tools__actions {
    justify-content: stretch !important;
  }

  .lag-form-draft-tools__btn {
    flex: 1 1 auto !important;
  }
}

/* 3.2.1 — Stable UX regression review: clearer keyboard focus for template details. */
.lag-industry-template-preview__details summary:focus-visible{
  outline:2px solid var(--lag-accent, #06b6d4);
  outline-offset:3px;
  border-radius:6px;
}
