/* ============================================================
   14 Calculadora de finiquito — migrado desde el post_content de la pagina 6
   el 21/08/2026. Los selectores .cfq2-* se conservan intactos porque el
   JavaScript los consulta por id y por clase. Solo se han sustituido los
   87 literales de color por tokens.
   ============================================================ */
/* ===== RESET & BASE ===== */
.cfq2-wrap *, .cfq2-wrap *::before, .cfq2-wrap *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
.cfq2-wrap {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--c-ink);
  max-width: 960px;
  margin: 0 auto;
}</p>
<p>/* ===== CARD ===== */
.cfq2-card {
  background: var(--c-surface);
  border-radius: 12px;
  box-shadow: 0 3px 24px rgba(0,0,0,0.10);
  overflow: hidden;
  margin-bottom: 28px;
}
.cfq2-card-header {
  background: linear-gradient(135deg, var(--c-ink) 0%, var(--c-ink-2) 100%);
  color: var(--c-surface);
  padding: 24px 32px;
}
.cfq2-card-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.cfq2-card-header p {
  font-size: 0.88rem;
  opacity: 0.78;
}</p>
<p>/* ===== FORM GRID ===== */
.cfq2-form {
  padding: 28px 32px;
}
.cfq2-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-ink-3);
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--c-surface-3);
}
.cfq2-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.cfq2-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cfq2-field label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--c-ink);
  display: flex;
  align-items: center;
  gap: 5px;
}
.cfq2-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--c-line-2);
  color: var(--c-surface);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  flex-shrink: 0;
  position: relative;
}
.cfq2-tooltip:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-ink);
  color: var(--c-surface);
  font-size: 0.75rem;
  font-weight: 400;
  padding: 7px 10px;
  border-radius: 6px;
  white-space: normal;
  width: 220px;
  z-index: 100;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.cfq2-input-wrap {
  position: relative;
  display: flex;
}
.cfq2-input-wrap input,
.cfq2-field input,
.cfq2-field select {
  padding: 10px 13px;
  border: 1.5px solid var(--c-line);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--c-ink);
  background: var(--c-surface-2);
  width: 100%;
  min-height: 44px;
  transition: border-color 0.18s, background 0.18s;
  appearance: auto;
  font-family: inherit;
}
.cfq2-input-wrap input:focus,
.cfq2-field input:focus,
.cfq2-field select:focus {
  outline: none;
  border-color: var(--c-brand);
  background: var(--c-surface);
  box-shadow: 0 0 0 3px rgba(52,152,219,0.15);
}
.cfq2-input-wrap input.cfq2-err,
.cfq2-field input.cfq2-err,
.cfq2-field select.cfq2-err {
  border-color: var(--c-err);
  background: var(--c-err-bg);
}
.cfq2-btn-hoy {
  padding: 0 12px;
  background: var(--c-brand);
  color: var(--c-surface);
  border: none;
  border-radius: 0 8px 8px 0;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s;
  min-height: 44px;
}
.cfq2-btn-hoy:hover { background: var(--c-brand-dark); }
.cfq2-input-wrap input:has(+ .cfq2-btn-hoy) {
  border-radius: 8px 0 0 8px;
  border-right: none;
}
.cfq2-input-with-btn {
  border-radius: 8px 0 0 8px !important;
  border-right: none !important;
}
.cfq2-err-msg {
  font-size: 0.76rem;
  color: var(--c-err);
  display: none;
}
.cfq2-err-msg.visible { display: block; }
.cfq2-hint {
  font-size: 0.76rem;
  color: var(--c-ink-3);
}</p>
<p>/* Toggle switch */
.cfq2-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}
.cfq2-toggle-label {
  font-size: 0.83rem;
  color: var(--c-ink-2);
}
.cfq2-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.cfq2-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.cfq2-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--c-line);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.cfq2-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--c-surface);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.cfq2-toggle input:checked + .cfq2-toggle-slider { background: var(--c-brand); }
.cfq2-toggle input:checked + .cfq2-toggle-slider::before { transform: translateX(20px); }</p>
<p>/* Salary toggle */
.cfq2-salary-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.cfq2-salary-row input { flex: 1; }
.cfq2-salary-unit {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--c-line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--c-surface-2);
}
.cfq2-salary-unit button {
  padding: 0 14px;
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-ink-3);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  min-height: 44px;
}
.cfq2-salary-unit button.active {
  background: var(--c-brand);
  color: var(--c-surface);
}</p>
<p>/* ===== RESULTS ===== */
.cfq2-results {
  display: none;
  padding: 0 32px 32px;
}
.cfq2-results.visible { display: block; animation: cfq2-fadein 0.35s ease; }
@keyframes cfq2-fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }</p>
<p>/* Summary boxes */
.cfq2-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.cfq2-summary-box {
  border-radius: 10px;
  padding: 18px 20px;
  text-align: center;
}
.cfq2-summary-box.bruto {
  background: var(--c-ink);
  color: var(--c-surface);
}
.cfq2-summary-box.irpf {
  background: var(--c-warn-bg);
  border: 1.5px solid var(--c-warn);
  color: var(--c-warn);
}
.cfq2-summary-box.neto {
  background: linear-gradient(135deg, var(--c-ok), var(--c-ok));
  color: var(--c-surface);
}
.cfq2-summary-box .box-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
  margin-bottom: 6px;
}
.cfq2-summary-box .box-amount {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.cfq2-summary-box .box-sub {
  font-size: 0.76rem;
  opacity: 0.75;
  margin-top: 4px;
}</p>
<p>/* Breakdown table */
.cfq2-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: 10px;
  margin-top: 24px;
}
.cfq2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-bottom: 6px;
}
.cfq2-table thead tr {
  background: var(--c-ink);
  color: var(--c-surface);
}
.cfq2-table thead th {
  padding: 9px 13px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.cfq2-table thead th:last-child { text-align: right; }
.cfq2-table tbody tr:nth-child(even) { background: var(--c-surface-2); }
.cfq2-table tbody td {
  padding: 9px 13px;
  color: var(--c-ink);
  vertical-align: top;
}
.cfq2-table tbody td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--c-brand-dark);
  white-space: nowrap;
}
.cfq2-table tfoot td {
  padding: 10px 13px;
  font-weight: 700;
}
.cfq2-table tfoot tr.cfq2-tfoot-bruto {
  background: var(--c-brand-tint);
  border-top: 2px solid var(--c-ink);
}
.cfq2-table tfoot tr.cfq2-tfoot-irpf {
  background: var(--c-warn-bg);
  border-top: 1px solid var(--c-warn);
}
.cfq2-table tfoot tr.cfq2-tfoot-neto {
  background: var(--c-ok-bg);
  border-top: 2px solid var(--c-ok);
}
.cfq2-table tfoot td:last-child { text-align: right; }
.cfq2-table .cfq2-indem-row td:last-child { color: var(--c-series-4); }
.cfq2-table .cfq2-irpf-row td:last-child { color: var(--c-err); }
.cfq2-detail-note { font-size: 0.76rem; color: var(--c-ink-3); font-style: italic; }</p>
<p>/* ===== BAR CHART ===== */
.cfq2-chart {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cfq2-bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 90px;
  align-items: center;
  gap: 10px;
}
.cfq2-bar-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-ink);
  text-align: right;
}
.cfq2-bar-track {
  height: 22px;
  background: var(--c-surface-3);
  border-radius: 11px;
  overflow: hidden;
}
.cfq2-bar-fill {
  height: 100%;
  border-radius: 11px;
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  padding-left: 8px;
  min-width: 4px;
}
.cfq2-bar-fill span {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  white-space: nowrap;
  overflow: hidden;
}
.cfq2-bar-amount {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-brand-dark);
  text-align: right;
}
.cfq2-bar-c1 { background: var(--c-series-1); }
.cfq2-bar-c2 { background: var(--c-series-3); }
.cfq2-bar-c3 { background: var(--c-series-2); }
.cfq2-bar-c4 { background: var(--c-series-4); }</p>
<p>/* ===== COMPARATOR ===== */
.cfq2-comparator {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 4px;
}
.cfq2-comp-card {
  border: 2px solid var(--c-line);
  border-radius: 10px;
  padding: 16px 14px;
  background: var(--c-surface-2);
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}
.cfq2-comp-card.cfq2-selected {
  border-color: var(--c-brand);
  background: var(--c-brand-tint);
  box-shadow: 0 0 0 3px rgba(52,152,219,0.18);
}
.cfq2-comp-card.cfq2-best {
  border-color: var(--c-ok);
}
.cfq2-comp-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-brand);
  color: var(--c-surface);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.cfq2-comp-badge.best { background: var(--c-ok); }
.cfq2-comp-type {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: 4px;
  line-height: 1.3;
}
.cfq2-comp-dias {
  font-size: 0.72rem;
  color: var(--c-ink-3);
  margin-bottom: 10px;
}
.cfq2-comp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 3px 0;
  border-bottom: 1px solid var(--c-surface-3);
  font-size: 0.78rem;
}
.cfq2-comp-row:last-child { border-bottom: none; font-weight: 700; font-size: 0.88rem; }
.cfq2-comp-row .lbl { color: var(--c-ink-3); }
.cfq2-comp-row .val { font-weight: 600; color: var(--c-ink); }
.cfq2-comp-row.neto-row .val { color: var(--c-ok); font-size: 1rem; font-weight: 800; }
.cfq2-comp-row.irpf-row .val { color: var(--c-err); }</p>
<p>/* ===== NOTE BOX ===== */
.cfq2-note {
  background: var(--c-warn-bg);
  border-left: 4px solid var(--c-warn);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--c-warn);
  margin-top: 22px;
  line-height: 1.6;
}</p>
<p>/* ===== SALARY DAY INFO ===== */
.cfq2-info-row {
  display: flex;
  gap: 16px;
  background: var(--c-brand-tint);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.cfq2-info-item { flex: 1 1 160px; }
.cfq2-info-item .i-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-ink-3); font-weight: 600; }
.cfq2-info-item .i-val { font-size: 1.05rem; font-weight: 700; color: var(--c-ink); }</p>
<p>/* ===== GLOBAL ERROR ===== */
.cfq2-global-err {
  background: var(--c-err-bg);
  border: 1.5px solid var(--c-err);
  border-radius: 8px;
  color: var(--c-err);
  font-size: 0.88rem;
  padding: 10px 16px;
  display: none;
  margin-top: 8px;
}
.cfq2-global-err.visible { display: block; }</p>
<p>/* ===== RESPONSIVE ===== */
@media (max-width: 680px) {
  .cfq2-card-header { padding: 18px 18px; }
  .cfq2-form { padding: 18px 18px; }
  .cfq2-results { padding: 0 18px 24px; }
  .cfq2-grid { grid-template-columns: 1fr; }
  .cfq2-summary-grid { grid-template-columns: 1fr; gap: 10px; }
  .cfq2-comparator { grid-template-columns: 1fr 1fr; }
  .cfq2-bar-row { grid-template-columns: 100px 1fr 80px; }
  .cfq2-bar-label { font-size: 0.72rem; }
}
@media (max-width: 440px) {
  .cfq2-comparator { grid-template-columns: 1fr; }
  .cfq2-bar-row { grid-template-columns: 90px 1fr 72px; }
  .cfq2-summary-box .box-amount { font-size: 1.4rem; }
}
