/* ============================================ */
/* LISTADOS COMUNES - ESTILOS UNIFICADOS        */
/* ============================================ */
/* Uso: Incluir en heads.php después de sleek.css */
/* ============================================ */

/* ============================================ */
/* 1. BADGES DE ESTATUS                         */
/* ============================================ */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}
.status-pendiente { background: #f0ad4e; color: #000; }
.status-aprobado { background: #5cb85c; color: #fff; }
.status-rechazado { background: #d9534f; color: #fff; }
.status-expirado { background: #6c757d; color: #fff; }
.status-inactivo { background: #6c757d; color: #fff; }
.status-activo { background: #5cb85c; color: #fff; }
.status-bloqueado { background: #d9534f; color: #fff; }
.status-verificar { background: #f0ad4e; color: #000; }

/* ============================================ */
/* 2. BADGES DE TIPO                           */
/* ============================================ */
.badge-tipo {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    display: inline-block;
}
.badge-tipo-membresia { background: #e3f2fd; color: #1565c0; }
.badge-tipo-clishea { background: #e8f5e9; color: #2e7d32; }
.badge-tipo-servicio { background: #fff3e0; color: #e65100; }
.badge-tipo-producto { background: #f3e5f5; color: #6a1b9a; }
.badge-tipo-otro { background: #f5f5f5; color: #616161; }

/* ============================================ */
/* 3. ESTADÍSTICAS RÁPIDAS                     */
/* ============================================ */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid #4c84ff;
    transition: transform 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-3px);
}
.stat-card .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}
.stat-card .stat-label {
    font-size: 0.85rem;
    color: #6c757d;
}
.stat-card.stat-pendiente { border-left-color: #f0ad4e; }
.stat-card.stat-aprobado { border-left-color: #5cb85c; }
.stat-card.stat-rechazado { border-left-color: #d9534f; }
.stat-card.stat-total { border-left-color: #4c84ff; }
.stat-card.stat-activo { border-left-color: #5cb85c; }
.stat-card.stat-inactivo { border-left-color: #6c757d; }
.stat-card.stat-bloqueado { border-left-color: #d9534f; }

/* ============================================ */
/* 4. TABLA RESPONSIVE (CARDS EN MÓVIL)        */
/* ============================================ */
.table-responsive-cards {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-cards {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.table-cards thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    white-space: nowrap;
}

.table-cards tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

.table-cards tbody tr:hover {
    background-color: #f8f9fa;
}

/* ============================================ */
/* 5. RESPONSIVE: MÓVILES (< 768px)            */
/* ============================================ */
@media (max-width: 767.98px) {
    .table-cards thead {
        display: none;
    }

    .table-cards tbody tr {
        display: block;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        transition: box-shadow 0.2s ease;
    }

    .table-cards tbody tr:hover {
        background: #fff;
        box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    }

    .table-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #f1f3f5;
        flex-wrap: wrap;
        gap: 5px;
    }

    .table-cards tbody td:last-child {
        border-bottom: none;
    }

    .table-cards tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        color: #6c757d;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        flex: 0 0 40%;
        min-width: 80px;
    }

    .table-cards tbody td > * {
        flex: 1;
        text-align: right;
        min-width: 0;
        word-break: break-word;
    }

    /* Acciones en móviles - se apilan verticalmente */
    .table-cards tbody td:last-child {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding-top: 10px;
        margin-top: 5px;
        border-top: 2px solid #e9ecef;
    }

    .table-cards tbody td:last-child::before {
        display: none;
    }

    /* Botones en móviles */
    .btn-group-actions {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }

    .btn-group-actions .btn {
        width: 100%;
        border-radius: 6px !important;
        font-size: 0.85rem;
        padding: 8px 12px;
        text-align: center;
        justify-content: center;
    }

    /* Filtros en móviles */
    .filtros-row {
        flex-direction: column;
        gap: 10px;
    }
    .filtros-row .col,
    .filtros-row .col-md-2,
    .filtros-row .col-md-3 {
        width: 100%;
        flex: none;
        padding: 0;
    }
}

/* ============================================ */
/* 6. RESPONSIVE: TABLETS (768px - 991px)      */
/* ============================================ */
@media (min-width: 768px) and (max-width: 991.98px) {
    .table-cards tbody td {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    .table-cards thead th {
        padding: 10px 12px;
        font-size: 0.75rem;
    }
    .btn-group .btn,
    .btn-group-actions .btn {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}

/* ============================================ */
/* 7. DETALLE DE PAGOS / COMPROBANTES          */
/* ============================================ */
.detail-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 20px;
    border-left: 4px solid #4c84ff;
}
.detail-card.rechazado { border-left-color: #d9534f; }
.detail-card.aprobado { border-left-color: #5cb85c; }
.detail-card.pendiente { border-left-color: #f0ad4e; }

.detail-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-label {
    font-weight: 600;
    color: #495057;
    width: 180px;
    flex-shrink: 0;
}
.detail-value {
    color: #212529;
    flex: 1;
}

.info-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 10px 0;
}

/* ============================================ */
/* 8. DETALLE RESPONSIVE                       */
/* ============================================ */
@media (max-width: 767.98px) {
    .detail-row {
        flex-direction: column;
        padding: 10px 0;
    }
    .detail-label {
        width: 100%;
        font-size: 0.8rem;
        color: #6c757d;
        margin-bottom: 3px;
    }
    .detail-card {
        padding: 15px;
    }
}

/* ============================================ */
/* 9. PLANES DE PAGO (TARJETAS)               */
/* ============================================ */
.plan-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}
.plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.plan-card.selected {
    border-color: #4c84ff;
    background: #f0f7ff;
}
.price {
    font-size: 2rem;
    font-weight: bold;
    color: #4c84ff;
}

.btn-pagar {
    background: linear-gradient(135deg, #4c84ff 0%, #1961ff 100%);
    border: none;
    color: white;
    font-weight: bold;
}
.btn-pagar:hover {
    transform: scale(1.02);
    color: white;
}

.days-left {
    font-size: 0.8rem;
    margin-top: 5px;
}
.days-left.urgent { color: #d9534f; font-weight: bold; }
.days-left.warning { color: #f0ad4e; }
.days-left.ok { color: #5cb85c; }