/* ════════════════════════════════════════════════════════════
   CALCULADORA DE CESANTÍAS — cesantias.css
   Hero azul consistente · Acento índigo/violeta en resultados
   Mobile-first · Chips · Timeline · Animaciones suaves
   ════════════════════════════════════════════════════════════ */

:root {
    --azul:       #1d4ed8;
    --azul-dark:  #1e3a5f;
    --azul-mid:   #2563eb;
    --azul-light: #dbeafe;
    --indigo:     #4f46e5;
    --indigo-dk:  #3730a3;
    --indigo-lt:  #e0e7ff;
    --verde:      #059669;
    --verde-lt:   #d1fae5;
    --amber:      #d97706;
    --amber-lt:   #fef3c7;
    --rojo:       #dc2626;
    --gris-50:    #f9fafb;
    --gris-100:   #f3f4f6;
    --gris-200:   #e5e7eb;
    --gris-400:   #9ca3af;
    --gris-600:   #4b5563;
    --gris-700:   #374151;
    --gris-900:   #111827;
    --r-sm:       8px;
    --r-md:       14px;
    --r-lg:       20px;
    --sh-sm:      0 2px 8px rgba(0,0,0,.06);
    --sh-md:      0 4px 20px rgba(0,0,0,.09);
}

/* ── HERO ─────────────────────────────────────────────────── */
.ces-hero {
    background: linear-gradient(135deg, var(--azul-dark) 0%, #1e40af 55%, var(--azul-mid) 100%);
    color: white;
    padding: 36px 20px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.ces-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(255,255,255,.08) 0%, transparent 60%);
    pointer-events: none;
}
.ces-hero-inner { position: relative; max-width: 640px; margin: 0 auto; }

.ces-countdown {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 99px;
    padding: 6px 16px;
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.cd-pulse {
    width: 8px; height: 8px;
    background: #fbbf24;
    border-radius: 50%;
    animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.7)} }

.ces-hero h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
}
.ces-hero p { font-size: .97rem; opacity: .88; line-height: 1.6; margin-bottom: 18px; }

.ces-hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ch-chip {
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 99px;
    padding: 4px 13px;
    font-size: .78rem;
    font-weight: 700;
}
.hd-mobile { display: inline; }

/* ── NAV LABORAL ──────────────────────────────────────────── */
.laboral-nav {
    background: var(--azul-light);
    border: 1px solid #bfdbfe;
    border-radius: var(--r-md);
    padding: 12px 16px;
    margin-bottom: 20px;
}
.ln-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #1e40af; display: block; margin-bottom: 10px; }
.ln-scroll { display: flex; flex-wrap: wrap; gap: 7px; }
.laboral-nav a { font-size: .78rem; font-weight: 600; color: #1d4ed8; background: white; border: 1px solid #bfdbfe; border-radius: 99px; padding: 5px 13px; text-decoration: none; transition: all .18s; white-space: nowrap; }
.laboral-nav a:hover { background: var(--azul); color: white; border-color: var(--azul); }
.laboral-nav a.ln-active { background: var(--azul); color: white; border-color: var(--azul); }

/* ── FORM CARDS ───────────────────────────────────────────── */
.form-card {
    background: white;
    border-radius: var(--r-md);
    padding: 22px;
    box-shadow: var(--sh-sm);
    border: 1px solid var(--gris-200);
    margin-bottom: 16px;
    transition: box-shadow .2s;
}
.form-card:focus-within { box-shadow: 0 0 0 3px rgba(79,70,229,.1), var(--sh-sm); }

.step-label { display: flex; align-items: center; gap: 10px; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gris-600); margin-bottom: 14px; }
.step-num { width: 22px; height: 22px; background: var(--indigo); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .74rem; font-weight: 800; flex-shrink: 0; }

/* ── MODO TABS ────────────────────────────────────────────── */
.modo-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.modo-tab {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 14px 6px;
    background: var(--gris-50);
    border: 2px solid var(--gris-200);
    border-radius: var(--r-sm);
    cursor: pointer; transition: all .18s; text-align: center; min-height: 80px; justify-content: center;
}
.modo-tab:hover { border-color: var(--indigo); background: var(--indigo-lt); transform: translateY(-1px); }
.modo-tab.active { border-color: var(--indigo); background: var(--indigo-lt); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.mt-icon  { font-size: 1.4rem; }
.mt-title { font-size: .82rem; font-weight: 700; color: var(--gris-900); }
.mt-sub   { font-size: .7rem; color: var(--gris-400); }

/* ── SALARY CHIPS ─────────────────────────────────────────── */
.quick-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.qc-hint { font-size: .73rem; color: var(--gris-400); font-weight: 600; white-space: nowrap; }
.q-chip {
    background: var(--indigo-lt); color: var(--indigo);
    border: 1px solid #c7d2fe; border-radius: 99px;
    padding: 5px 12px; font-size: .78rem; font-weight: 700;
    cursor: pointer; transition: all .15s; white-space: nowrap;
}
.q-chip:hover { background: var(--indigo); color: white; border-color: var(--indigo); transform: translateY(-1px); }
.q-chip.chip-active { background: var(--indigo); color: white; border-color: var(--indigo); }

/* ── SALARY INPUT ─────────────────────────────────────────── */
.salary-input-wrap { display: flex; align-items: center; background: var(--gris-50); border: 2px solid var(--gris-200); border-radius: var(--r-sm); padding: 0 14px; transition: all .2s; margin-bottom: 6px; }
.salary-input-wrap:focus-within { border-color: var(--indigo); background: white; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.sip { font-size: 1.2rem; font-weight: 700; color: var(--indigo); margin-right: 6px; user-select: none; }
.salary-input { flex:1; border:none; background:transparent; font-size:1.4rem; font-weight:700; color:var(--gris-900); padding:14px 0; outline:none; font-family:'Courier New',monospace; min-width:0; }
.salary-input::placeholder { color: var(--gris-200); font-weight: 400; }

.auxilio-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--verde-lt); color: #065f46; border: 1px solid #a7f3d0; border-radius: 99px; padding: 5px 13px; font-size: .78rem; font-weight: 700; margin: 8px 0; animation: fadeUp .2s ease; }
@keyframes fadeUp { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:translateY(0)} }
.aux-select-wrap { margin-top: 10px; }
.aux-select { width:100%; padding:10px 14px; border:2px solid var(--gris-200); border-radius:var(--r-sm); font-size:.9rem; font-weight:600; color:var(--gris-700); background:white; cursor:pointer; transition:border-color .2s; }
.aux-select:focus { outline:none; border-color:var(--indigo); }

/* ── PERÍODO ──────────────────────────────────────────────── */
.field-label { font-size: .84rem; font-weight: 600; color: var(--gris-700); margin-bottom: 8px; display: block; }
.field-hint  { font-size: .74rem; color: var(--gris-400); margin-top: 4px; }
.field-err   { font-size: .78rem; color: var(--rojo); margin-top: 4px; min-height: 16px; }

/* Chips de meses */
.meses-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 6px; }
.mes-chip {
    background: var(--gris-100); color: var(--gris-700);
    border: 2px solid var(--gris-200); border-radius: 99px;
    padding: 6px 14px; font-size: .8rem; font-weight: 700;
    cursor: pointer; transition: all .15s;
}
.mes-chip:hover { border-color: var(--indigo); color: var(--indigo); }
.mes-chip.active { background: var(--indigo); color: white; border-color: var(--indigo); }

/* Chips de años */
.anos-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.ano-chip {
    background: var(--gris-100); color: var(--gris-700);
    border: 2px solid var(--gris-200); border-radius: 99px;
    padding: 6px 14px; font-size: .8rem; font-weight: 700;
    cursor: pointer; transition: all .15s;
}
.ano-chip:hover { border-color: var(--indigo); color: var(--indigo); }
.ano-chip.active { background: var(--indigo); color: white; border-color: var(--indigo); }

/* Fechas row */
.fechas-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.date-input { width:100%; padding:12px 14px; border:2px solid var(--gris-200); border-radius:var(--r-sm); font-size:.9rem; font-weight:600; color:var(--gris-900); transition:border-color .2s; box-sizing:border-box; }
.date-input:focus { outline:none; border-color:var(--indigo); }

/* ── PREVIEW EN VIVO ──────────────────────────────────────── */
.ces-preview {
    background: linear-gradient(135deg, var(--indigo-dk) 0%, var(--indigo) 100%);
    border-radius: var(--r-md); padding: 18px 16px;
    color: white; margin: 16px 0; transition: opacity .25s, transform .25s;
}
.ces-preview.hidden { opacity: .25; transform: scale(.98); }
.cpv-row { display: flex; align-items: center; justify-content: space-around; gap: 8px; margin-bottom: 8px; }
.cpv-item { text-align: center; flex: 1; }
.cpv-total { background: rgba(255,255,255,.15); border-radius: 10px; padding: 8px 4px; }
.cpv-label { font-size: .7rem; opacity: .8; margin-bottom: 4px; }
.cpv-val   { font-size: 1.05rem; font-weight: 800; font-family: 'Courier New', monospace; }
.cpv-div   { font-size: 1.4rem; font-weight: 700; opacity: .7; flex-shrink: 0; }
.cpv-meta  { font-size: .74rem; opacity: .7; text-align: center; }

/* ── BOTONES ──────────────────────────────────────────────── */
.btn-calcular { width:100%; padding:16px 24px; background:linear-gradient(135deg,var(--indigo) 0%,var(--indigo-dk) 100%); color:white; border:none; border-radius:var(--r-sm); font-size:1.05rem; font-weight:700; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:10px; box-shadow:0 4px 14px rgba(79,70,229,.3); transition:all .2s; margin-bottom:10px; }
.btn-calcular:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(79,70,229,.4); }
.btn-limpiar { width:100%; padding:12px; background:white; color:var(--gris-600); border:2px solid var(--gris-200); border-radius:var(--r-sm); font-size:.9rem; font-weight:600; cursor:pointer; transition:all .18s; margin-bottom:14px; }
.btn-limpiar:hover { background:var(--gris-50); border-color:var(--gris-400); }
.datos-strip { display:flex; align-items:center; justify-content:center; gap:8px; font-size:.73rem; color:var(--gris-400); flex-wrap:wrap; }

/* ── EMPTY STATE ──────────────────────────────────────────── */
.ces-empty { background:white; border-radius:var(--r-lg); padding:24px; box-shadow:var(--sh-md); border:1px solid var(--gris-200); }
.empty-eyebrow { font-size:.73rem; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:var(--indigo); margin-bottom:16px; }

/* Timeline */
.timeline-ces { position:relative; padding-left:28px; margin-bottom:18px; }
.timeline-ces::before { content:''; position:absolute; left:9px; top:6px; bottom:6px; width:2px; background:linear-gradient(180deg,var(--gris-200) 0%,var(--amber) 50%,var(--gris-200) 100%); }
.tl-item { position:relative; margin-bottom:16px; }
.tl-item:last-child { margin-bottom:0; }
.tl-dot { position:absolute; left:-23px; top:4px; width:12px; height:12px; border-radius:50%; background:var(--gris-300); border:2px solid white; box-shadow:0 0 0 2px var(--gris-300); }
.tl-alert .tl-dot { background:var(--amber); box-shadow:0 0 0 2px var(--amber); }
.tl-date { font-size:.78rem; font-weight:700; color:var(--gris-600); margin-bottom:2px; }
.tl-alert .tl-date { color:var(--amber); }
.tl-desc { font-size:.82rem; color:var(--gris-700); }

.formula-block { background:var(--gris-50); border-radius:var(--r-sm); padding:12px; text-align:center; }
.fb-title  { font-size:.7rem; font-weight:700; color:var(--gris-400); text-transform:uppercase; letter-spacing:.06em; margin-bottom:5px; }
.fb-formula { font-size:.95rem; font-weight:700; color:var(--indigo); font-family:'Courier New',monospace; }

.smmlv-block { background:white; border:1px solid var(--gris-200); border-radius:var(--r-sm); overflow:hidden; margin:12px 0; }
.sb-title { background:var(--indigo); color:white; padding:8px 14px; font-size:.74rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.sb-row { display:flex; justify-content:space-between; padding:9px 14px; font-size:.84rem; color:var(--gris-700); border-bottom:1px solid var(--gris-100); }
.sb-row:last-child { border-bottom:none; }
.sb-total { font-weight:700; color:var(--verde); background:var(--verde-lt); }

/* Retiros box */
.retiros-box { background:var(--indigo-lt); border-radius:var(--r-sm); padding:14px; }
.rb-title { font-size:.78rem; font-weight:700; color:var(--indigo-dk); margin-bottom:10px; }
.rb-items { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.rb-item { font-size:.78rem; color:var(--indigo-dk); background:white; border-radius:6px; padding:7px 10px; border:1px solid #c7d2fe; }

/* ── RESULTADOS ───────────────────────────────────────────── */
.result-hero { background:linear-gradient(135deg,var(--indigo-dk) 0%,var(--indigo) 100%); border-radius:var(--r-md); padding:28px; color:white; text-align:center; margin-bottom:18px; }
.rh-label  { font-size:.88rem; opacity:.82; margin-bottom:6px; }
.rh-amount { font-size:3rem; font-weight:900; font-family:'Courier New',monospace; margin-bottom:6px; }
.rh-note   { font-size:.82rem; opacity:.8; }

/* Mini grid de tarjetas */
.result-mini-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:16px; }
.rmc { background:var(--gris-50); border:1px solid var(--gris-200); border-radius:var(--r-sm); padding:14px; text-align:center; }
.rmc-label { font-size:.74rem; color:var(--gris-400); margin-bottom:5px; }
.rmc-value { font-size:1.1rem; font-weight:800; font-family:'Courier New',monospace; color:var(--gris-900); }
.rmc-value.indigo { color:var(--indigo); }
.rmc-value.verde  { color:var(--verde); }
.rmc-value.amber  { color:var(--amber); }

/* Barra de progreso */
.progress-wrap { margin:14px 0; }
.progress-label { display:flex; justify-content:space-between; font-size:.76rem; color:var(--gris-600); margin-bottom:5px; }
.progress-bar   { height:10px; background:var(--gris-100); border-radius:99px; overflow:hidden; }
.progress-fill  { height:100%; background:linear-gradient(90deg,var(--indigo) 0%,#818cf8 100%); border-radius:99px; transition:width .6s ease; }

/* Desglose */
.desglose-box { background:white; border:1px solid var(--gris-200); border-radius:var(--r-sm); overflow:hidden; margin-bottom:14px; }
.desglose-header { background:var(--indigo); color:white; padding:9px 16px; font-size:.74rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.desglose-row { display:flex; justify-content:space-between; align-items:center; padding:10px 16px; border-bottom:1px solid var(--gris-100); font-size:.84rem; }
.desglose-row:last-child { border-bottom:none; }
.dr-label  { color:var(--gris-700); }
.dr-detail { font-size:.72rem; color:var(--gris-400); margin-left:6px; }
.dr-value  { font-weight:700; font-family:'Courier New',monospace; color:var(--indigo); }
.dr-value.verde { color:var(--verde); }
.dr-value.amber { color:var(--amber); }

/* Tabla acumulado */
.acum-table { width:100%; border-collapse:collapse; font-size:.83rem; }
.acum-table thead th { background:var(--indigo); color:white; padding:10px 12px; text-align:left; font-weight:700; }
.acum-table tbody tr:nth-child(even) { background:var(--gris-50); }
.acum-table tbody td { padding:9px 12px; color:var(--gris-700); border-bottom:1px solid var(--gris-100); }
.acum-table tfoot td { padding:10px 12px; font-weight:700; background:var(--indigo-lt); color:var(--indigo-dk); border-top:2px solid #c7d2fe; }
.acum-table .row-actual td { background:#ede9fe; color:var(--indigo-dk); font-weight:700; }

/* Alerta depósito */
.deposito-alert { background:var(--amber-lt); border-left:4px solid var(--amber); border-radius:8px; padding:14px 16px; margin-bottom:14px; }
.da-title { font-size:.9rem; font-weight:700; color:#92400e; margin-bottom:6px; }
.da-body  { font-size:.84rem; color:#78350f; line-height:1.6; margin:0; }

/* Tip final */
.result-tip { background:var(--indigo-lt); border-left:4px solid var(--indigo); border-radius:8px; padding:14px 16px; margin-bottom:14px; }
.result-tip h4 { font-size:.9rem; font-weight:700; color:var(--gris-900); margin-bottom:6px; }
.result-tip p  { font-size:.84rem; color:var(--gris-700); line-height:1.6; margin:0; }

.btn-recalcular { width:100%; padding:12px; background:white; color:var(--indigo); border:2px solid var(--indigo); border-radius:var(--r-sm); font-size:.9rem; font-weight:700; cursor:pointer; transition:all .18s; }
.btn-recalcular:hover { background:var(--indigo); color:white; }

/* Content section */
.example-box { background:var(--indigo-lt); border-left:4px solid var(--indigo); border-radius:8px; padding:16px; margin:16px 0; }
.example-box h4 { font-size:.95rem; font-weight:700; color:var(--gris-900); margin-bottom:8px; }
.example-box p  { font-size:.88rem; color:var(--gris-700); line-height:1.7; margin-bottom:4px; }
.highlight { color:var(--verde); font-weight:700; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width:768px) {
    .modo-tabs { grid-template-columns:1fr; }
    .modo-tab  { flex-direction:row; gap:12px; text-align:left; min-height:auto; padding:13px 16px; }
    .mt-sub    { display:none; }
    .fechas-row { grid-template-columns:1fr; }
    .result-mini-grid { grid-template-columns:1fr; }
    .rb-items { grid-template-columns:1fr; }
    .rh-amount { font-size:2.2rem; }
    .cpv-val   { font-size:.9rem; }
    .hd-mobile { display:none; }
    .acum-table { font-size:.76rem; }
    .acum-table th, .acum-table td { padding:7px 8px; }
}
@media (max-width:480px) {
    .ces-hero { padding:28px 16px 22px; }
    .ces-hero h1 { font-size:1.4rem; }
    .form-card { padding:16px; }
    .salary-input { font-size:1.2rem; }
    .cpv-row { flex-direction:column; gap:6px; }
    .cpv-div { transform:rotate(90deg); }
    .btn-calcular { font-size:.97rem; }
}
@media (prefers-reduced-motion:reduce) {
    .cd-pulse, .ces-preview, .btn-calcular, .q-chip { animation:none; transition:none; }
}