:root{
  /* Paleta (según imagen):
     Guinda: #9F2241
     Verde:  #235B4E
     Beige:  #DCD9A3
     Gris:   #98989A
  */
  --bg:#ffffff;
  --card:#ffffff;
  --border:rgba(15, 23, 42, .12);
  --text:#0f172a;
  --muted:rgba(15, 23, 42, .62);

  --guinda:#9F2241;
  --guinda2:#7f1b34; /* sombra/tono */
  --verde:#235B4E;
  --beige:#DCD9A3;
  --gris:#98989A;

  --shadow:0 16px 40px rgba(15,23,42,.12);
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:
    radial-gradient(1100px 700px at 10% 0%, rgba(159,34,65,.10), transparent 55%),
    radial-gradient(900px 700px at 95% 10%, rgba(35,91,78,.10), transparent 55%),
    linear-gradient(180deg, #fff 0%, #fbfbfc 100%);
  color:var(--text);
}
.container{max-width:1280px;margin:0 auto;padding:28px}
.topbar{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:14px 18px;border:1px solid var(--border);border-radius:18px;
  background:rgba(255,255,255,.85);backdrop-filter:blur(10px);box-shadow:var(--shadow);
}
.brand{display:flex;align-items:center;gap:12px}
.brand img{height:78px} /* logo más grande */
.brand b{display:block;font-size:14px}
.brand span{display:block;font-size:12px;color:var(--muted)}
.pill{padding:8px 12px;border-radius:999px;border:1px solid var(--border);background:rgba(15,23,42,.03);font-size:12px;color:var(--muted)}
.grid{display:grid;grid-template-columns:1.15fr .85fr;gap:18px;margin-top:18px}
@media(max-width:900px){.grid{grid-template-columns:1fr}}
.card{
  background:rgba(255,255,255,.92);
  border:1px solid var(--border);
  border-radius:24px;
  padding:22px;
  box-shadow:var(--shadow)
}
.h1{font-size:26px;margin:0 0 10px}
.sub{color:var(--muted);font-size:13px;line-height:1.45}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  border:1px solid rgba(159,34,65,.22);
  background:linear-gradient(135deg,var(--guinda),var(--guinda2));
  color:#fff;text-decoration:none;font-weight:800;
  padding:12px 14px;border-radius:14px;cursor:pointer
}
.btn.secondary{
  background:#fff;
  color:var(--guinda);
  border-color:rgba(159,34,65,.35);
}
.btn.ghost{
  background:transparent;
  color:var(--text);
  border-color:var(--border);
}
.btn.small{padding:9px 11px;border-radius:12px;font-size:13px}
.row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:680px){.row{grid-template-columns:1fr}}
.field label{display:block;font-size:12px;color:var(--muted);margin:2px 0 6px}
.field input,.field select,.field textarea{
  width:100%;
  background:#fff;
  border:1px solid rgba(15,23,42,.16);
  color:var(--text);
  padding:13px 14px;
  border-radius:14px;
  outline:none;
  font-size:15px;
}
.field input:focus,.field select:focus,.field textarea:focus{
  border-color:rgba(159,34,65,.45);
  box-shadow:0 0 0 4px rgba(159,34,65,.12);
}
.field textarea{min-height:88px;resize:vertical}
.steps{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 8px}
.step{
  display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;
  border:1px solid rgba(15,23,42,.14);
  background:rgba(15,23,42,.02);
  color:var(--muted);font-size:13px
}
.step .n{
  width:26px;height:26px;border-radius:999px;
  background:rgba(35,91,78,.10);
  display:flex;align-items:center;justify-content:center;
  color:var(--verde);font-weight:900
}
.step.active{
  color:var(--text);
  border-color:rgba(35,91,78,.35);
  background:rgba(35,91,78,.06)
}
.hr{height:1px;background:rgba(15,23,42,.12);margin:14px 0}
.table{width:100%;border-collapse:separate;border-spacing:0 10px}
.table th{color:var(--muted);font-size:12px;text-align:left;padding:0 10px}
.table td{
  background:#fff;border:1px solid rgba(15,23,42,.12);
  padding:12px 10px
}
.table tr td:first-child{border-top-left-radius:14px;border-bottom-left-radius:14px}
.table tr td:last-child{border-top-right-radius:14px;border-bottom-right-radius:14px}
.badge{
  display:inline-flex;align-items:center;gap:8px;
  padding:6px 10px;border-radius:999px;
  border:1px solid rgba(15,23,42,.14);
  background:rgba(15,23,42,.03);
  font-size:12px;color:var(--muted)
}
.badge.ok{border-color:rgba(35,91,78,.35);color:var(--verde);background:rgba(35,91,78,.08)}
.badge.warn{border-color:rgba(159,34,65,.35);color:var(--guinda);background:rgba(159,34,65,.08)}
.notice{
  padding:12px 14px;border-radius:14px;
  border:1px solid rgba(15,23,42,.14);
  background:rgba(220,217,163,.25);
  color:rgba(15,23,42,.75);
  font-size:13px;line-height:1.5
}

@media(max-width:600px){.brand img{height:56px}.container{padding:18px}.card{padding:16px}}

@media(min-width:901px){.steps{position:sticky;top:16px;z-index:2;background:transparent}}



/* ===== CURP-like (gob.mx) look ===== */
.gov-top{
  background: linear-gradient(180deg, #6a1a32 0%, var(--guinda) 100%);
  color:#fff;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.gov-top .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 22px;
}
.gov-brand{
  display:flex;align-items:center;gap:12px;
}
.gov-brand .seal{
  width:42px;height:42px;border-radius:999px;
  background:rgba(255,255,255,.12);
  display:flex;align-items:center;justify-content:center;
  font-weight:900;letter-spacing:.5px;
}
.gov-brand .txt{
  line-height:1.05;
}
.gov-brand .txt .t1{font-weight:800;font-size:14px;opacity:.95}
.gov-brand .txt .t2{font-weight:900;font-size:20px;letter-spacing:.2px}
.gov-nav{display:flex;align-items:center;gap:18px;font-size:13px;opacity:.95}
.gov-nav a{color:#fff;text-decoration:none}
.gov-nav a:hover{opacity:.9;text-decoration:underline}
.gov-subbar{
  background:#541428;
  color:#fff;
  padding:10px 22px;
  font-weight:700;
  letter-spacing:.3px;
}
.page{
  max-width:1100px;margin:0 auto;padding:26px 22px;
}
.breadcrumb{
  display:flex;gap:8px;align-items:center;flex-wrap:wrap;
  color:rgba(15,23,42,.65);
  font-size:13px;margin-bottom:12px;
}
.breadcrumb a{color:rgba(15,23,42,.7);text-decoration:none}
.breadcrumb a:hover{text-decoration:underline}
.page-title{
  font-size:54px;
  letter-spacing:-.8px;
  margin: 8px 0 18px;
  font-weight:900;
  color:#2b2b2b;
}
@media(max-width:760px){
  .page-title{font-size:40px}
}
.stepper{
  display:flex;gap:0;align-items:stretch;
  border-radius:8px;overflow:hidden;
  border:1px solid rgba(15,23,42,.12);
  background:#f3f3f3;
  max-width:720px;
  margin: 0 0 24px;
}
.stepper .st{
  flex:1;
  padding:14px 18px;
  display:flex;flex-direction:column;justify-content:center;
  position:relative;
  color:rgba(15,23,42,.65);
}
.stepper .st strong{font-size:13px}
.stepper .st span{font-size:12px;opacity:.9}
.stepper .st.active{
  background:var(--guinda);
  color:#fff;
}
.stepper .st.active:after{
  content:"";
  position:absolute;right:-24px;top:0;bottom:0;
  width:0;height:0;
  border-top:26px solid transparent;
  border-bottom:26px solid transparent;
  border-left:24px solid var(--guinda);
  z-index:2;
}
.stepper .st:not(.active):before{
  content:"";
  position:absolute;left:0;top:0;bottom:0;
  width:1px;background:rgba(15,23,42,.10);
}
.section-title{
  font-size:34px;
  font-weight:900;
  color:#2b2b2b;
  margin: 0 0 12px;
}
.section-underline{
  height:3px;width:160px;background:#b08a4a; /* dorado sobrio */
  border-radius:999px;margin-bottom:18px;
}
.panel{
  background:#fff;
  border:1px solid rgba(15,23,42,.12);
  border-radius:10px;
  padding:20px;
}
.tabs{
  display:flex;gap:0;align-items:center;
  border-bottom:1px solid rgba(15,23,42,.12);
  margin-bottom:18px;
}
.tabs .tab{
  padding:12px 16px;
  font-size:13px;
  border:1px solid rgba(15,23,42,.12);
  border-bottom:none;
  border-top-left-radius:8px;border-top-right-radius:8px;
  background:#f7f7f7;
  color:rgba(15,23,42,.70);
  margin-right:8px;
}
.tabs .tab.active{
  background:var(--guinda);
  color:#fff;
  border-color:rgba(0,0,0,.05);
}
.form-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px 18px;
}
@media(max-width:900px){
  .form-grid{grid-template-columns:1fr}
}
.field label{
  font-weight:700;
  color:rgba(15,23,42,.78);
}
.field input,.field select,.field textarea{
  border-radius:6px;
  border:1px solid rgba(0,0,0,.20);
  padding:12px 12px;
}
.actions{
  display:flex;gap:12px;justify-content:flex-end;flex-wrap:wrap;margin-top:18px;
}
.btn.curp{
  border-radius:6px;
  padding:12px 16px;
  background:var(--guinda);
  border-color:rgba(0,0,0,.12);
  font-weight:900;
}
.btn.curp.secondary{
  background:#fff;color:var(--guinda);
  border:1px solid rgba(159,34,65,.35);
}
.small-note{font-size:12px;color:rgba(15,23,42,.65);line-height:1.5}




@media(max-width:820px){
  .wizard-steps{max-width:100%}
  .wizard-steps .wizardbar-i{padding-left:18px}
  .wizard-steps .wizardbar-i:after,
  .wizard-steps .wizardbar-i:before{display:none}
}


/* ===== Wizard steps (idéntico estilo gob.mx CURP) =====
   Clases requeridas:
   - wizard-steps
   - wizardbar-i
   - wizardbar-i completed
*/
.wizard-steps{
  display:flex;
  list-style:none;
  padding:0;
  margin: 0 0 26px;
  max-width: 760px;
  background:#ececec;
  border-radius:4px;
  overflow:hidden;
}
.wizard-steps .wizardbar-i{
  position:relative;
  flex:1;
  padding:14px 22px;
  background:#efefef;
  border-right:2px solid #fff;
  color:#1f2937;
  min-height:56px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:2px;
}
.wizard-steps .wizardbar-i:last-child{ border-right:none; }
.wizard-steps .wizardbar-i .wizard-step-title{
  font-weight:800;
  font-size:14px;
  line-height:1.1;
}
.wizard-steps .wizardbar-i .wizard-step-subtitle{
  font-size:12px;
  opacity:.9;
}
.wizard-steps .wizardbar-i:after{
  content:"";
  position:absolute;
  top:0;
  right:-34px;
  width:0;height:0;
  border-top:28px solid transparent;
  border-bottom:28px solid transparent;
  border-left:34px solid #efefef;
  z-index:2;
}
.wizard-steps .wizardbar-i:before{
  content:"";
  position:absolute;
  top:0;
  right:-36px;
  width:0;height:0;
  border-top:28px solid transparent;
  border-bottom:28px solid transparent;
  border-left:36px solid #ffffff;
  z-index:1;
}
.wizard-steps .wizardbar-i:last-child:after,
.wizard-steps .wizardbar-i:last-child:before{ display:none; }

.wizard-steps .wizardbar-i.active{
  background: var(--guinda);
  color:#fff;
}
.wizard-steps .wizardbar-i.active:after{ border-left-color: var(--guinda); }

.wizard-steps .wizardbar-i.completed{
  background:#f2f2f2;
  color:#111827;
}
.wizard-steps .wizardbar-i.completed:after{ border-left-color:#f2f2f2; }

/* Compact mobile */
@media (max-width: 820px){
  .wizard-steps{max-width:100%;}
  .wizard-steps .wizardbar-i{
    padding:12px 14px;
    min-height:52px;
  }
  .wizard-steps .wizardbar-i:after,
  .wizard-steps .wizardbar-i:before{ display:none; }
}



/* FORCE: wizardbar debe verse como CURP (alta prioridad) */
.page ul.wizard-steps{display:flex!important; list-style:none!important; padding:0!important; margin:0 0 26px!important; max-width:760px!important; background:#ececec!important; border-radius:4px!important; overflow:hidden!important;}
.page ul.wizard-steps > li.wizardbar-i{position:relative!important; flex:1!important; padding:14px 22px!important; background:#efefef!important; border-right:2px solid #fff!important; color:#1f2937!important; min-height:56px!important; display:flex!important; flex-direction:column!important; justify-content:center!important; gap:2px!important;}
.page ul.wizard-steps > li.wizardbar-i:last-child{border-right:none!important;}
.page ul.wizard-steps > li.wizardbar-i .wizard-step-title{font-weight:800!important; font-size:14px!important; line-height:1.1!important;}
.page ul.wizard-steps > li.wizardbar-i .wizard-step-subtitle{font-size:12px!important; opacity:.9!important;}
.page ul.wizard-steps > li.wizardbar-i:after{content:""!important; position:absolute!important; top:0!important; right:-34px!important; width:0!important; height:0!important; border-top:28px solid transparent!important; border-bottom:28px solid transparent!important; border-left:34px solid #efefef!important; z-index:2!important;}
.page ul.wizard-steps > li.wizardbar-i:before{content:""!important; position:absolute!important; top:0!important; right:-36px!important; width:0!important; height:0!important; border-top:28px solid transparent!important; border-bottom:28px solid transparent!important; border-left:36px solid #ffffff!important; z-index:1!important;}
.page ul.wizard-steps > li.wizardbar-i:last-child:after,
.page ul.wizard-steps > li.wizardbar-i:last-child:before{display:none!important;}
.page ul.wizard-steps > li.wizardbar-i.active{background:var(--guinda)!important; color:#fff!important;}
.page ul.wizard-steps > li.wizardbar-i.active:after{border-left-color:var(--guinda)!important;}
.page ul.wizard-steps > li.wizardbar-i.completed{background:#f2f2f2!important; color:#111827!important;}
.page ul.wizard-steps > li.wizardbar-i.completed:after{border-left-color:#f2f2f2!important;}
@media(max-width:820px){
  .page ul.wizard-steps{max-width:100%!important;}
  .page ul.wizard-steps > li.wizardbar-i{padding:12px 14px!important; min-height:52px!important;}
  .page ul.wizard-steps > li.wizardbar-i:after,
  .page ul.wizard-steps > li.wizardbar-i:before{display:none!important;}
}



/* ===== Wizard CURP (gob.mx style) ===== */
.wizard-steps{
  display:flex;
  list-style:none;
  padding:0;
  margin: 12px 0 16px;
  max-width: 760px;
  background:#e9e9e9;
  border-radius:3px;
  overflow:hidden;
}
.wizard-steps .wizardbar-i{
  position:relative;
  flex:1;
  background:#efefef;
  min-height:64px;
  padding: 14px 22px 14px 26px;
  color:#111827;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:2px;
}
.wizard-steps .wizardbar-i .wizard-step-title{
  font-weight:800;
  font-size:14px;
  line-height:1.1;
}
.wizard-steps .wizardbar-i .wizard-step-subtitle{
  font-size:12px;
  opacity:.95;
}
.wizard-steps .wizardbar-i:after{
  content:"";
  position:absolute;
  top:0;
  right:-40px;
  width:0;height:0;
  border-top:32px solid transparent;
  border-bottom:32px solid transparent;
  border-left:40px solid #efefef;
  z-index:2;
}
.wizard-steps .wizardbar-i:before{
  content:"";
  position:absolute;
  top:0;
  right:-42px;
  width:0;height:0;
  border-top:32px solid transparent;
  border-bottom:32px solid transparent;
  border-left:42px solid #ffffff;
  z-index:1;
}
.wizard-steps .wizardbar-i:last-child:after,
.wizard-steps .wizardbar-i:last-child:before{display:none;}
.wizard-steps .wizardbar-i.active{
  background:var(--guinda);
  color:#fff;
}
.wizard-steps .wizardbar-i.active:after{border-left-color:var(--guinda);}
.wizard-steps .wizardbar-i.completed{
  background:#f3f3f3;
  color:#111827;
}
.wizard-steps .wizardbar-i.completed:after{border-left-color:#f3f3f3;}

/* Oculta el stepper tipo "píldoras" (se mantiene en DOM para no romper JS legacy) */
.steps{ display:none; }

@media(max-width:860px){
  .wizard-steps{max-width:100%;}
  .wizard-steps .wizardbar-i{min-height:58px; padding:12px 14px;}
  .wizard-steps .wizardbar-i:after,
  .wizard-steps .wizardbar-i:before{display:none;}
}


/* ===== Wizard tweak: desplazar texto a la derecha (evita que la flecha tape Paso 2/3) ===== */
.wizard-steps .wizardbar-i{
  padding-left: 56px !important; /* espacio para la flecha previa */
}
.wizard-steps .wizardbar-i:first-child{
  padding-left: 26px !important;
}
.wizard-steps .wizardbar-content{
  position: relative !important;
  z-index: 5 !important;
}
.wizard-steps .wizardbar-i{
  z-index: 1;
}
.wizard-steps .wizardbar-i.completed{ z-index: 2; }
.wizard-steps .wizardbar-i.active{ z-index: 3; }

/* Corte en la izquierda (como breadcrumb) para que se vea limpio el empalme */
.wizard-steps .wizardbar-i:not(:first-child):before{
  content:"" !important;
  position:absolute !important;
  left:0 !important;
  top:0 !important;
  width:0 !important;
  height:0 !important;
  border-top:32px solid transparent !important;
  border-bottom:32px solid transparent !important;
  border-left:32px solid #ffffff !important; /* el "corte" */
  z-index:4 !important;
}
@media(max-width:860px){
  .wizard-steps .wizardbar-i{ padding-left: 14px !important; }
  .wizard-steps .wizardbar-i:not(:first-child):before{ display:none !important; }
}


/* ===== Header logos ===== */
.gov-top .gov-brand .gov-logo{
  height: 59px;
  width: auto;
  display:block;
}
@media(max-width:720px){
  .gov-top .gov-brand .gov-logo{ height: 30px; }
}
/* Logo CBTIS (tarjeta blanca) más grande */
.topbar .brand img{
  height: 64px !important;
  width: auto !important;
}
@media(max-width:720px){
  .topbar .brand img{ height: 56px !important; }
}

.btn.danger{background:var(--guinda);border-color:var(--guinda);color:#fff}
.btn.danger:hover{filter:brightness(.95)}


/* === CBTIS78 v4.7 FIX: evita formulario en blanco si JS no carga === */
form [data-step]{ display:none; }
form [data-step="1"]{ display:block; }
