/* ERP Styles for Eternidad Previsión */
.et-erp-container {
    max-width: 1000px;
    margin: 2rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.et-step {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stepper Form */
.et-step input, .et-step select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.et-btn-next, .et-btn-prev, #btn-add-beneficiario, #btn-finalizar-afiliacion {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.et-btn-next { background: var(--et-color-primary, #1a2744); color: #fff; }
.et-btn-prev { background: #e0e0e0; color: #333; }
#btn-finalizar-afiliacion { background: #28a745; color: #fff; }

/* ERP Operator Dashboard */
#et-operador-app {
    display: flex;
    gap: 20px;
    min-height: 600px;
}

.erp-sidebar {
    width: 250px;
    border-right: 1px solid #eee;
    padding-right: 15px;
}

.erp-menu { list-style: none; padding: 0; margin: 0; }
.erp-menu li {
    padding: 12px 15px;
    margin-bottom: 5px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}
.erp-menu li:hover { background: #f5f5f5; }
.erp-menu li.active { background: var(--et-color-primary, #1a2744); color: #fff; }
.erp-separator { font-weight: bold; margin-top: 15px; margin-bottom: 5px; text-transform: uppercase; font-size: 0.8rem; color: #888; pointer-events: none; padding-left: 15px; }

.erp-content { flex: 1; }
.erp-view.active { display: block !important; }

/* Responsive */
@media (max-width: 768px) {
    #et-operador-app { flex-direction: column; }
    .erp-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #eee; padding-bottom: 15px;}
}

/* ── Tables ─────────────────────────────── */
.erp-table {
    width:           100%;
    border-collapse: collapse;
    font-size:       0.88rem;
}
.erp-table th, .erp-table td {
    padding:      10px 12px;
    text-align:   left;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}
.erp-table th {
    background:  var(--et-color-primary, #1a2744);
    color:       #fff;
    font-weight: 600;
    font-size:   0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.erp-table tr:hover td { background: rgba(201,169,110,0.06); }

/* ── Stat Cards ─────────────────────────── */
.erp-stats-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap:                   16px;
    margin-top:            16px;
}
.erp-stat-card {
    padding:       20px;
    background:    var(--et-color-primary, #1a2744);
    border-radius: 8px;
    text-align:    center;
    color:         #fff;
}
.erp-stat-card span {
    display:     block;
    font-size:   2.2rem;
    font-weight: 700;
    color:       var(--et-color-accent, #c9a96e);
}
.erp-stat-card label { font-size: 0.78rem; opacity: 0.75; letter-spacing: 0.05em; }
.erp-stat-card.warn span { color: #f39c12; }

/* ── Inline Form ────────────────────────── */
.erp-form-inline {
    display:    flex;
    flex-wrap:  wrap;
    gap:        8px;
    margin-bottom: 16px;
    align-items: center;
}
.erp-input {
    padding:      8px 12px;
    border:       1px solid #d0c8b8;
    border-radius: 4px;
    font-size:    0.85rem;
    flex:         1 1 160px;
}
.erp-btn {
    padding:          9px 20px;
    background-color: var(--et-color-primary, #1a2744);
    color:            var(--et-color-accent, #c9a96e);
    border:           none;
    border-radius:    4px;
    font-weight:      700;
    cursor:           pointer;
    font-size:        0.85rem;
    transition:       background 0.2s ease;
}
.erp-btn:hover { background: #0d1422; }

.erp-btn-sm {
    padding:       4px 10px;
    border:        none;
    border-radius: 3px;
    cursor:        pointer;
    color:         #fff;
    font-size:     0.75rem;
    font-weight:   700;
    margin-right:  4px;
    background:    var(--et-color-primary, #1a2744);
    transition:    opacity 0.2s ease;
}
.erp-btn-sm:hover { opacity: 0.85; }

/* ── Client Portal ──────────────────────── */
.et-cliente-card {
    background:    #f9f6f0;
    border:        1px solid #e0d8c8;
    border-radius: 8px;
    padding:       24px;
}
.et-cliente-card p { margin-bottom: 10px; }

.et-badge-activo    { color: #2ecc71; font-weight: 700; }
.et-badge-pendiente { color: #f39c12; font-weight: 700; }
.et-badge-bloqueado { color: #e74c3c; font-weight: 700; }

/* ── Success Box ────────────────────────── */
.et-success-box {
    text-align:    center;
    padding:       48px 32px;
    background:    #f0faf0;
    border:        2px solid #2ecc71;
    border-radius: 8px;
}
.et-success-box h3 { color: #1a7a40; font-size: 1.8rem; }

/* ── Plan Radio Cards ───────────────────── */
.et-plan-radio {
    display:       block;
    padding:       14px 18px;
    border:        1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor:        pointer;
    transition:    border-color 0.2s ease, background 0.2s ease;
}
.et-plan-radio:hover { border-color: var(--et-color-accent, #c9a96e); background: #fdfaf5; }
.et-plan-radio input { margin-right: 10px; }

/* ── Tabs (cliente) ─────────────────────── */
.et-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab-link {
    padding:       8px 18px;
    border:        2px solid var(--et-color-primary, #1a2744);
    border-radius: 4px;
    background:    transparent;
    cursor:        pointer;
    font-weight:   600;
    color:         var(--et-color-primary, #1a2744);
    transition:    background 0.2s ease;
}
.tab-link.active {
    background: var(--et-color-primary, #1a2744);
    color:      #fff;
}

/* ── Rich Text Editor ───────────────────── */
.et-editor-toolbar {
    display:       flex;
    flex-wrap:     wrap;
    gap:           4px;
    padding:       10px;
    background:    #f5f5f5;
    border:        1px solid #ccc;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border-bottom: none;
    align-items:   center;
}
.et-editor-btn {
    background:    #fff;
    border:        1px solid #ddd;
    border-radius: 4px;
    padding:       6px 10px;
    cursor:        pointer;
    font-size:     0.85rem;
    font-weight:   600;
    color:         #333;
    transition:    all 0.15s ease;
}
.et-editor-btn:hover {
    background:    #eef2fa;
    border-color:  var(--et-color-primary, #1a2744);
    color:         var(--et-color-primary, #1a2744);
}
.et-editor-divider {
    width:         1px;
    height:        24px;
    background:    #ccc;
    margin:        0 8px;
}
.et-editor-content {
    min-height:    350px;
    padding:       16px;
    border:        1px solid #ccc;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    background:    #fff;
    font-size:     0.95rem;
    line-height:   1.6;
    overflow-y:    auto;
}
.et-editor-content:focus {
    outline:       none;
    border-color:  var(--et-color-primary, #1a2744);
    box-shadow:    0 0 0 2px rgba(26,39,68,0.1);
}
.et-editor-var-btn {
    background:    #eef2fa;
    color:         var(--et-color-primary, #1a2744);
    border:        1px dashed var(--et-color-primary, #1a2744);
    font-size:     0.75rem;
}
.et-editor-var-btn:hover {
    background:    var(--et-color-primary, #1a2744);
    color:         #fff;
}


