/* ÁBAKO PRO v1.3.1 - styles isolated with crm- prefix */

.crm-wrap{font-family:inherit;}
.crm-inner{display:grid;grid-template-columns: 7fr 3fr;gap:18px;align-items:start;}

.crm-card{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:14px;box-shadow:0 6px 18px rgba(0,0,0,.06);overflow:hidden;}
.crm-card-header{padding:18px 18px 8px 18px;}
.crm-h{margin:0 0 6px 0;font-size:18px;line-height:1.25;}
.crm-sub{margin:0;color:rgba(0,0,0,.65);font-size:13px;}

.crm-col-form .crm-card{padding-bottom:10px;}

.crm-field{padding:14px 18px;}
.crm-label{display:block;font-weight:600;margin:0 0 8px 0;font-size:13px;}

.crm-input{width:100%;border:1px solid rgba(0,0,0,.14);border-radius:10px;padding:11px 12px;font-size:14px;outline:none;transition:all .15s ease;background:#fff;}
.crm-input:focus{border-color:var(--crm-primary);box-shadow:0 0 0 3px rgba(254,121,12,.18);}

.crm-help{margin-top:6px;font-size:12px;color:rgba(0,0,0,.55);}

.crm-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 18px;}
.crm-grid-2 .crm-field{padding:10px 0;}

.crm-toggle{display:flex;gap:10px;align-items:flex-start;font-size:14px;color:rgba(0,0,0,.85);cursor:pointer;user-select:none;}
.crm-toggle input{margin-top:3px;accent-color:var(--crm-primary);}
.crm-toggle em{font-style:normal;color:rgba(0,0,0,.6);}

.crm-note{margin:8px 18px 18px 18px;padding:12px 12px;border-radius:12px;background:rgba(254,121,12,.08);border:1px solid rgba(254,121,12,.22);font-size:13px;color:rgba(0,0,0,.75);}

.crm-summary{position:sticky;top:18px;}
.crm-summary-rows{padding:8px 18px 8px 18px;}

.crm-row{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px dashed rgba(0,0,0,.10);}
.crm-row:last-child{border-bottom:none;}
.crm-row span{font-size:13px;color:rgba(0,0,0,.72);}
.crm-row strong{font-size:13px;font-weight:700;color:#111;white-space:nowrap;}

.crm-divider{height:1px;background:rgba(0,0,0,.10);margin:6px 18px;}

.crm-totals{padding:6px 18px 16px 18px;}
.crm-row-total span{font-weight:700;color:#111;}
.crm-row-grand{border-bottom:none;padding-top:12px;}
.crm-row-grand strong{font-size:18px;color:var(--crm-primary);}

.crm-range{margin-top:8px;padding:10px 12px;border-radius:12px;background:rgba(0,0,0,.04);font-size:12px;color:rgba(0,0,0,.65);}

.crm-legal{padding:0 18px 18px 18px;font-size:12px;color:rgba(0,0,0,.55);}

/* Responsive */
@media (max-width: 991px){
  .crm-inner{grid-template-columns:1fr;}
  .crm-summary{position:static;top:auto;}
  .crm-row-grand strong{font-size:17px;}
  .crm-grid-2{grid-template-columns:1fr;}
}

/* Keep it compatible with themes that set box-sizing */
.crm-wrap, .crm-wrap *{box-sizing:border-box;}


/* Inline fields (e.g., largo/ancho) */
.crm-inline{display:flex;gap:10px;}
.crm-inline input{flex:1;min-width:0;}

/* --- Compatibility: style inputs/selects even if crm-input class is missing (older modules) --- */
.crm-wrap .crm-card > h3{
  margin:0;
  padding:18px 18px 8px 18px;
  font-size:18px;
  line-height:1.25;
}

.crm-wrap .crm-card label{
  font-weight:600;
  font-size:13px;
}

/* Inputs/selects inside calculator cards (exclude checkboxes/radios) */
.crm-wrap .crm-card input:not([type="checkbox"]):not([type="radio"]),
.crm-wrap .crm-card select,
.crm-wrap .crm-card textarea{
  width:100%;
  border:1px solid rgba(0,0,0,.14);
  border-radius:10px;
  padding:11px 12px;
  font-size:14px;
  outline:none;
  transition:all .15s ease;
  background:#fff;
}

.crm-wrap .crm-card input:not([type="checkbox"]):not([type="radio"]):focus,
.crm-wrap .crm-card select:focus,
.crm-wrap .crm-card textarea:focus{
  border-color:var(--crm-primary);
  box-shadow:0 0 0 3px rgba(254,121,12,.18);
}

/* Checkbox rows used by some modules */
.crm-wrap .crm-check label{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size:14px;
  color:rgba(0,0,0,.85);
  cursor:pointer;
  user-select:none;
  font-weight:600;
}

.crm-wrap .crm-check input{
  margin-top:3px;
  accent-color:var(--crm-primary);
}

/* Spacing parity: if a module uses .crm-lines, treat it like summary rows */
.crm-lines{padding:8px 18px 8px 18px;}

/* ===== App autosuficiente con tabs internas ===== */
.crm-app{
  --crm-blue:#0b5be7;
  --crm-blue-dark:#073b93;
  --crm-orange:#ff7a1a;
  --crm-soft:#f6f9ff;
  width:100%;
  max-width:1180px;
  margin:0 auto;
  padding:18px;
  border-radius:28px;
  background:linear-gradient(135deg,#f7fbff 0%,#ffffff 48%,#fff5ec 100%);
  border:1px solid rgba(11,91,231,.10);
  box-shadow:0 24px 70px rgba(15,40,80,.12);
  box-sizing:border-box;
}
.crm-app, .crm-app *{box-sizing:border-box;}
.crm-app-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  padding:12px 10px 18px;
}
.crm-app-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(11,91,231,.09);
  color:var(--crm-blue-dark);
  font-weight:800;
  font-size:12px;
  letter-spacing:.02em;
}
.crm-app-hero h2{
  margin:0;
  color:#0b1833;
  font-size:clamp(24px,3vw,38px);
  line-height:1.05;
  letter-spacing:-.035em;
}
.crm-app-hero p{
  margin:10px 0 0;
  max-width:680px;
  color:rgba(11,24,51,.68);
  font-size:15px;
  line-height:1.55;
}
.crm-app-badge{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-radius:18px;
  background:#fff;
  box-shadow:0 10px 28px rgba(15,40,80,.10);
  color:#17335f;
  font-size:13px;
}
.crm-app-badge span{
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  border-radius:9px;
  background:rgba(28,190,113,.12);
  color:#15975a;
  font-weight:900;
}
.crm-app-tabs{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:10px;
  margin:0 0 16px;
  padding:8px;
  border-radius:22px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(11,91,231,.10);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
}
.crm-app-tab{
  appearance:none;
  border:1px solid rgba(11,91,231,.10);
  background:#fff;
  color:#12284a;
  min-height:76px;
  padding:12px 8px;
  border-radius:18px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-weight:800;
  font-size:13px;
  line-height:1.1;
  box-shadow:0 8px 20px rgba(15,40,80,.06);
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.crm-app-tab:hover{
  transform:translateY(-2px);
  border-color:rgba(255,122,26,.45);
  box-shadow:0 14px 28px rgba(15,40,80,.11);
}
.crm-app-tab.is-active{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg,var(--crm-blue) 0%,#0a4dcc 55%,var(--crm-orange) 140%);
  box-shadow:0 15px 34px rgba(11,91,231,.28);
}
.crm-app-tab-icon{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:13px;
  background:rgba(11,91,231,.08);
  font-size:18px;
}
.crm-app-tab.is-active .crm-app-tab-icon{background:rgba(255,255,255,.18);}
.crm-app-panels{position:relative;}
.crm-app-panel{display:none;}
.crm-app-panel.is-active{display:block;}
.crm-app .crm-wrap{padding:0;}
.crm-app .crm-inner{grid-template-columns:65fr 35fr;gap:18px;}
.crm-app .crm-card{
  border:1px solid rgba(11,91,231,.10);
  border-radius:22px;
  box-shadow:0 18px 45px rgba(15,40,80,.10);
}
.crm-app .crm-summary{
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
.crm-app .crm-card-header,
.crm-app .crm-wrap .crm-card > h3{padding:20px 20px 8px;}
.crm-app .crm-h,
.crm-app .crm-wrap .crm-card > h3{font-size:20px;color:#0b1833;letter-spacing:-.02em;}
.crm-app .crm-sub{color:rgba(11,24,51,.62);}
.crm-app .crm-field{padding:14px 20px;}
.crm-app .crm-grid-2{padding:0 20px;}
.crm-app .crm-note{
  margin:10px 20px 20px;
  background:rgba(255,122,26,.08);
  border-color:rgba(255,122,26,.24);
}
.crm-app .crm-row-grand strong{font-size:24px;color:var(--crm-blue);}
.crm-app .crm-range{
  background:rgba(11,91,231,.07);
  color:#17335f;
  border:1px solid rgba(11,91,231,.08);
}
.crm-app .crm-wrap .crm-card input:not([type="checkbox"]):not([type="radio"]):focus,
.crm-app .crm-wrap .crm-card select:focus,
.crm-app .crm-wrap .crm-card textarea:focus,
.crm-app .crm-input:focus{
  border-color:var(--crm-blue);
  box-shadow:0 0 0 4px rgba(11,91,231,.12);
}
.crm-app .crm-toggle input,
.crm-app .crm-check input{accent-color:var(--crm-blue);}

@media (max-width: 1024px){
  .crm-app-tabs{grid-template-columns:repeat(4,minmax(0,1fr));}
  .crm-app .crm-inner{grid-template-columns:1fr;}
  .crm-app .crm-summary{position:static;}
}

@media (max-width: 767px){
  .crm-app{
    width:calc(100% - 14px);
    margin:0 auto;
    padding:10px;
    border-radius:24px;
  }
  .crm-app-hero{
    display:block;
    padding:8px 6px 12px;
  }
  .crm-app-hero h2{font-size:25px;line-height:1.08;}
  .crm-app-hero p{font-size:13px;margin-top:8px;}
  .crm-app-badge{display:none;}
  .crm-app-tabs{
    display:flex;
    overflow-x:auto;
    gap:9px;
    padding:7px;
    margin-bottom:12px;
    border-radius:20px;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x mandatory;
  }
  .crm-app-tabs::-webkit-scrollbar{display:none;}
  .crm-app-tab{
    flex:0 0 92px;
    min-height:82px;
    border-radius:18px;
    font-size:12px;
    scroll-snap-align:start;
  }
  .crm-app-tab-icon{width:34px;height:34px;font-size:18px;}
  .crm-app .crm-card{border-radius:20px;box-shadow:0 14px 34px rgba(15,40,80,.10);}
  .crm-app .crm-card-header,
  .crm-app .crm-wrap .crm-card > h3{padding:18px 16px 6px;}
  .crm-app .crm-field{padding:12px 16px;}
  .crm-app .crm-grid-2{padding:0 16px;grid-template-columns:1fr;}
  .crm-app .crm-row-grand strong{font-size:22px;}
  .crm-app .crm-summary{margin-top:12px;}
}


.crm-app-badge small{display:block;margin-top:4px;font-size:11px;font-weight:700;opacity:.72;line-height:1.2;}
.crm-app-credit{text-align:center;margin:14px auto 0;font-size:12px;color:#64748b;}
.crm-app-credit strong{color:#0f172a;}
