.listar {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 95%;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 12px;
}

.listar h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.listar>a {
    display: inline-block;
    background-color: #2980b9;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 1rem;
    transition: background-color 0.3s;
}

.listar>a:hover {
    background-color: #21618c;
}


/* Tabla */

.listar table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.listar th,
.listar td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.listar th {
    background-color: #ecf0f1;
    color: #2c3e50;
    font-weight: 600;
}

.listar tr:hover {
    background-color: #f1f1f1;
}


/* Acciones */

.listar td a {
    margin-right: 0.5rem;
    text-decoration: none;
    color: #27ae60;
    font-weight: bold;
    transition: color 0.3s;
}

.listar td a:hover {
    color: #1e944d;
}


/* Responsive */

@media (max-width: 768px) {
    .listar table,
    .listar thead,
    .listar tbody,
    .listar th,
    .listar td,
    .listar tr {
        display: block;
    }
    .listar tr {
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 0.8rem;
        background-color: #fff;
    }
    .listar td {
        padding: 0.5rem 0;
        text-align: right;
        position: relative;
    }
    .listar td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        font-weight: bold;
        text-align: left;
    }
    .listar th {
        display: none;
    }
}