/* ===== ESTILOS CALCULADORA DE NÓMINA Y PILA 2026 ===== */
.nomina-hero {
    background: linear-gradient(135deg, #1e3d86 0%, #3065d8 60%, #4480f0 100%);
    padding: 150px 0 70px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}
.nomina-hero::after {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: rgba(255, 204, 0, 0.14);
    right: -80px;
    top: -80px;
    pointer-events: none;
}
.reference-pills {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}
.reference-pill {
    background: rgba(255, 255, 255, 0.95);
    color: var(--dark);
    border-radius: 16px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
}
.reference-pill strong {
    color: var(--primary-dark);
    font-weight: 800;
}

.nomina-wrap {
    padding: 60px 0 90px;
    background: #f8fafc;
}
.nomina-grid {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
    gap: 28px;
    align-items: start;
}
.nomina-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
    padding: 34px;
}
.nomina-header-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 18px;
    margin-bottom: 24px;
}
.step-num {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 1rem;
}
.company-exemption-card {
    background: linear-gradient(135deg, #f0f7ff, #fffdfa);
    border: 1.5px solid #dbeafe;
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 28px;
}
.company-exemption-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e3a8a;
    margin: 0 0 6px;
}
.company-exemption-card p {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0 0 14px;
    line-height: 1.5;
}
.exemption-toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.exemption-toggle-btn {
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    padding: 11px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.exemption-toggle-btn.active {
    border-color: var(--primary);
    background: #eff6ff;
    color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(102, 153, 255, 0.15);
}

/* EMPLOYEE CARDS */
.employee-card {
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.employee-card:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 8px 24px rgba(102, 153, 255, 0.08);
}
.employee-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.employee-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}
.employee-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--secondary), #fba962);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 0.95rem;
}
.employee-title-input {
    border: none;
    background: transparent;
    font-weight: 800;
    font-size: 1rem;
    color: #0f172a;
    width: 170px;
    outline: none;
}
.employee-title-input:focus {
    border-bottom: 1.5px solid var(--primary);
}
.btn-remove-emp {
    border: none;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease;
}
.btn-remove-emp:hover {
    background: #fee2e2;
}
.employee-fields {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 14px;
}
.emp-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}
.emp-input-wrap {
    position: relative;
}
.emp-input-wrap span {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: 700;
    pointer-events: none;
}
.emp-input-wrap input {
    width: 100%;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    padding: 10px 12px 10px 28px;
    font-weight: 700;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s ease;
}
.emp-input-wrap input:focus {
    border-color: var(--primary);
    background: #ffffff;
}
.emp-select {
    width: 100%;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease;
}
.emp-select:focus {
    border-color: var(--primary);
    background: #ffffff;
}
.transport-toggle-row {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 14px;
    margin-top: 6px;
}
.transport-toggle-row span {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
}
.emp-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.emp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.emp-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cbd5e1;
    transition: 0.2s ease;
    cursor: pointer;
}
.emp-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    left: 3px;
    top: 3px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: 0.2s ease;
}
.emp-switch input:checked + .emp-slider {
    background: #10b981;
}
.emp-switch input:checked + .emp-slider::after {
    transform: translateX(20px);
}
.emp-eligibility-msg {
    grid-column: 1 / -1;
    font-size: 0.74rem;
    color: #64748b;
    margin-top: -4px;
}
.emp-eligibility-msg.warn {
    color: #b45309;
    font-weight: 700;
}
.btn-add-emp {
    width: 100%;
    margin-top: 14px;
    border: 2px dashed #93c5fd;
    background: #f0f7ff;
    color: var(--primary-dark);
    border-radius: 16px;
    padding: 14px;
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-add-emp:hover {
    background: #e0effe;
    border-color: var(--primary);
}

/* SUMMARY PANEL */
.nomina-summary {
    position: sticky;
    top: 90px;
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}
.summary-top-card {
    padding: 26px 24px;
    background: linear-gradient(135deg, #1e3d86, #3b6bd6);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}
.summary-top-card::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    right: -70px;
    top: -70px;
    background: rgba(255, 204, 0, 0.16);
    pointer-events: none;
}
.summary-title-label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}
.summary-big-val {
    font-size: clamp(2rem, 3.5vw, 2.7rem);
    font-weight: 900;
    line-height: 1.1;
    margin: 8px 0 4px;
    letter-spacing: -0.02em;
}
.summary-note-text {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.8);
}

.summary-body-pad {
    padding: 24px;
}
.metric-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.metric-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
}
.metric-card span {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 700;
    display: block;
    line-height: 1.3;
}
.metric-card strong {
    display: block;
    margin-top: 4px;
    font-size: 1.05rem;
    font-weight: 900;
    color: #0f172a;
}
.metric-card.highlight-orange {
    background: #fff7ed;
    border-color: #fed7aa;
}
.metric-card.highlight-orange strong {
    color: var(--secondary);
}
.metric-card.highlight-yellow {
    background: #fefce8;
    border-color: #fef08a;
}
.metric-card.highlight-yellow strong {
    color: #a16207;
}

.nomina-breakdown-table {
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}
.nomina-breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.8rem;
    color: #475569;
}
.nomina-breakdown-row.total-row {
    border-top: 1px solid #e2e8f0;
    margin-top: 6px;
    padding-top: 10px;
    font-weight: 800;
    color: #0f172a;
}
.btn-toggle-details {
    width: 100%;
    border: none;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--primary-dark);
    padding: 11px;
    margin-top: 16px;
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.btn-toggle-details:hover {
    background: #dbeafe;
}
.nomina-emp-details {
    display: none;
    margin-top: 14px;
    background: #f8fafc;
    border-radius: 14px;
    padding: 14px;
    border: 1px solid #e2e8f0;
}
.nomina-emp-details.open {
    display: block;
}
.detail-item {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.detail-item h4 {
    margin: 0 0 6px;
    font-size: 0.82rem;
    color: #1e293b;
}
.detail-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.74rem;
    color: #64748b;
    padding: 2px 0;
}
.detail-line b {
    color: #0f172a;
}

@media (max-width: 900px) {
    .nomina-grid {
        grid-template-columns: 1fr;
    }
    .nomina-summary {
        position: static;
    }
}
@media (max-width: 600px) {
    .employee-fields {
        grid-template-columns: 1fr;
    }
    .metric-grid-2 {
        grid-template-columns: 1fr;
    }
    .nomina-card {
        padding: 20px 16px;
    }
}
