/* =========================================================
  Loliando - admin.css (Panel de Administración)
  ========================================================= */

:root {
    --admin-bg: #f8f9fa;
    --admin-card-bg: #ffffff;
    --admin-border: #e9ecef;
    --admin-primary: #00a650;
    --admin-secondary: #6c757d;
    --admin-success: #28a745;
    --admin-danger: #dc3545;
    --admin-warning: #ffc107;
    --admin-info: #17a2b8;
}

body {
    background-color: var(--admin-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--admin-border);
}

.admin-header h1 {
    margin: 0;
    color: var(--admin-primary);
    font-size: 2.2em;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.admin-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--admin-primary);
    color: white;
}

.btn-primary:hover {
    background: #008a43;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--admin-secondary);
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-warning {
    background: var(--admin-warning);
    color: #000;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-info {
    background: var(--admin-info);
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-danger {
    background: var(--admin-danger);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--admin-card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card h3 {
    margin: 0 0 15px 0;
    color: var(--admin-secondary);
    font-size: 1.1em;
    font-weight: 600;
}

.stat-card p {
    margin: 0;
    font-size: 2.5em;
    font-weight: bold;
    color: var(--admin-primary);
}

/* Pestañas */
.admin-tabs {
    display: flex;
    border-bottom: 2px solid var(--admin-border);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--admin-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--admin-primary);
}

.tab-btn.active {
    color: var(--admin-primary);
    border-bottom-color: var(--admin-primary);
}

.tab-content {
    margin-bottom: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

/* Secciones */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 4px;
    min-width: 250px;
}

.btn-small {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

/* Tablas */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th {
    background: var(--admin-bg);
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--admin-secondary);
    border-bottom: 2px solid var(--admin-border);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--admin-border);
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

/* Tarjetas de información */
.order-info-card,
.cart-info-card {
    background: var(--admin-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Items de pedido */
.order-item,
.cart-item,
.admin-order-card {
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.orders-container {
    margin-top: 20px;
}

.admin-order-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.item-details {
    margin-bottom: 15px;
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-select {
    padding: 8px;
    border: 1px solid var(--admin-border);
    border-radius: 4px;
}

.shipping-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shipping-fields input {
    padding: 8px;
    border: 1px solid var(--admin-border);
    border-radius: 4px;
}

/* Badges de estado */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.status-processing {
    background: #fff3cd;
    color: #856404;
}

.status-shipping {
    background: #cce5ff;
    color: #004085;
}

.status-delivered {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Estados vacíos */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--admin-secondary);
}

/* Modal de administración */
.admin-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.admin-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 25px;
    border-radius: 8px;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.admin-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.admin-modal-close:hover {
    color: black;
}

/* Detalles de usuario */
.user-detail-card {
    background: var(--admin-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.user-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.user-stat {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-number {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--admin-primary);
    margin: 10px 0 0;
}

.modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Estilos para la sección de comisiones */
.commission-config {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.commission-rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.rate-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #4a6da7;
}

.rate-card h4 {
    margin: 0 0 10px 0;
    color: #343a40;
}

.rate-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4a6da7;
}

.commission-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.commission-table th {
    background-color: #4a6da7;
    color: white;
    padding: 12px;
    text-align: left;
}

.commission-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.commission-table tr:hover {
    background-color: #f5f5f5;
}

.commission-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.summary-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary-card h3 {
    margin: 0 0 10px 0;
    color: #6c757d;
    font-size: 1rem;
}

.summary-card .value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #4a6da7;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filters input,
.filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

.rate-slider {
    width: 100%;
    margin: 10px 0;
}

.table-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

/* Estilos para conversaciones */
.conversacion-completa {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 15px;
}

.conversacion-grupo {
    margin-bottom: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: white;
}

.cabecera-conversacion {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--admin-primary);
}

.cabecera-conversacion h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.producto-contexto {
    font-size: 14px;
    color: #666;
    background: rgba(0, 166, 80, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
}

.mensajes-contenedor {
    max-height: 250px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.mensaje-admin {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    position: relative;
    animation: fadeIn 0.3s ease-in;
}

.mensaje-usuario {
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
    border-left: 4px solid var(--admin-primary);
    margin-left: 20px;
}

.mensaje-otro {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-left: 4px solid var(--admin-info);
    margin-right: 20px;
}

.cabecera-mensaje-admin {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.remitente-admin {
    font-weight: 600;
    color: #333;
}

.mensaje-usuario .remitente-admin {
    color: var(--admin-primary);
}

.mensaje-otro .remitente-admin {
    color: var(--admin-info);
}

.fecha-admin {
    color: #666;
    font-size: 11px;
}

.contenido-mensaje-admin p {
    margin: 0;
    line-height: 1.4;
    word-wrap: break-word;
    color: #333;
}

.advertencia-mensaje-admin {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #856404;
    margin-top: 8px;
    padding: 4px 8px;
    background: #fff3cd;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

.advertencia-icono {
    font-size: 12px;
}

.estadisticas-conversacion {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.estadisticas-conversacion h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    text-align: center;
}

.stats-grid-admin {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.stat-admin {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.stat-number-admin {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--admin-primary);
    margin-bottom: 5px;
}

.stat-label-admin {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 1024px) {
    .admin-container {
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .data-table {
        font-size: 0.9em;
    }

    .user-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid-admin {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .admin-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        min-width: unset;
        flex: 1;
    }

    .user-stats-grid {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
    }

    .stats-grid-admin {
        grid-template-columns: 1fr;
    }

    .commission-rates-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        flex-direction: column;
    }

    .filters input,
    .filters select {
        min-width: unset;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .admin-container {
        padding: 10px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-card h3 {
        font-size: 1em;
    }

    .stat-card p {
        font-size: 2em;
    }

    .admin-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .stat-admin {
        padding: 12px;
    }

    .stat-number-admin {
        font-size: 20px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    animation: fadeIn 0.5s ease-out;
}

.data-table tr {
    animation: fadeIn 0.3s ease-out;
}

/* Scrollbar personalizado */
.data-table::-webkit-scrollbar,
.conversacion-completa::-webkit-scrollbar,
.mensajes-contenedor::-webkit-scrollbar,
.admin-modal-content::-webkit-scrollbar {
    width: 8px;
}

.data-table::-webkit-scrollbar-track,
.conversacion-completa::-webkit-scrollbar-track,
.mensajes-contenedor::-webkit-scrollbar-track,
.admin-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.data-table::-webkit-scrollbar-thumb,
.conversacion-completa::-webkit-scrollbar-thumb,
.mensajes-contenedor::-webkit-scrollbar-thumb,
.admin-modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.data-table::-webkit-scrollbar-thumb:hover,
.conversacion-completa::-webkit-scrollbar-thumb:hover,
.mensajes-contenedor::-webkit-scrollbar-thumb:hover,
.admin-modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Estilos para botones pequeños en tablas */
.btn-small {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    background: var(--admin-primary);
    color: white;
    transition: background 0.2s;
}

.btn-small:hover {
    background: #008a43;
}

.btn-small.btn-primary {
    background: var(--admin-primary);
}

.btn-small.btn-primary:hover {
    background: #008a43;
}

/* Selects en pedidos */
.select-estado-item {
    padding: 6px 10px;
    border: 1px solid var(--admin-border);
    border-radius: 4px;
    font-size: 0.9em;
}

/* Botones de actualizar en pedidos */
.btn-update-item {
    padding: 6px 12px;
    background: var(--admin-success);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
}

.btn-update-item:hover {
    background: #218838;
}

/* Botones de eliminar */
.btn-remove-from-cart {
    padding: 6px 12px;
    background: var(--admin-danger);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
}

.btn-remove-from-cart:hover {
    background: #c82333;
}

/* Badges de estado para comisiones */
.status-delivered {
    background: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-shipping {
    background: #cce5ff;
    color: #004085;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-processing {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

/* Estilos para conversaciones */
.conversaciones-section {
    margin-top: 20px;
    border-top: 2px solid var(--admin-border);
    padding-top: 20px;
}

.conversaciones-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 15px;
}

.conversacion-item {
    background: white;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.conv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.conv-fecha {
    font-size: 0.85em;
    color: var(--admin-secondary);
}

.conv-preview {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 0.9em;
}

/* Estilos para reportes */
.secciones-reporte {
    margin: 20px 0;
}

.secciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.seccion-card {
    background: white;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.seccion-card h5 {
    margin: 0 0 10px 0;
    color: var(--admin-primary);
    border-bottom: 1px solid var(--admin-border);
    padding-bottom: 5px;
}

.seccion-card ul {
    margin: 0;
    padding-left: 15px;
    font-size: 0.9em;
}

.seccion-card li {
    margin-bottom: 5px;
    word-break: break-word;
}

.user-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Estilos para reportes de usuario */
.reporte-usuario {
    max-height: 80vh;
    overflow-y: auto;
}

.estadisticas-usuario {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.actividad-reciente {
    margin: 20px 0;
}

.lista-actividad {
    max-height: 200px;
    overflow-y: auto;
}

.item-actividad {
    background: white;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid var(--admin-primary);
}

/* Estilos para contactar usuario */
.contactar-usuario {
    max-height: 80vh;
    overflow-y: auto;
}

.info-contacto {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.form-contacto {
    margin-bottom: 20px;
}

.acciones-contacto {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.opciones-rapidas {
    margin-top: 20px;
}

.botones-rapidos {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Estilos para conversaciones */
.mensaje-admin {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    position: relative;
    animation: fadeIn 0.3s ease-in;
}

.mensaje-usuario {
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
    border-left: 4px solid var(--admin-primary);
    margin-left: 20px;
}

.mensaje-otro {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-left: 4px solid var(--admin-info);
    margin-right: 20px;
}

.cabecera-mensaje-admin {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.remitente-admin {
    font-weight: 600;
    color: #333;
}

.mensaje-usuario .remitente-admin {
    color: var(--admin-primary);
}

.mensaje-otro .remitente-admin {
    color: var(--admin-info);
}

.fecha-admin {
    color: #666;
    font-size: 11px;
}

.contenido-mensaje-admin p {
    margin: 0;
    line-height: 1.4;
    word-wrap: break-word;
    color: #333;
}

.adjuntos-admin {
    margin-top: 8px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    font-size: 11px;
}

.acciones-conversacion {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--admin-border);
}

/* Estilos para conversaciones en admin */
.conversaciones-section {
    margin: 20px 0;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.conversacion-item-admin {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    background: white;
}

.conv-header-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.conv-preview-admin {
    color: #666;
    margin-bottom: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.conv-actions-admin {
    display: flex;
    gap: 8px;
}

.mensajes-contenedor-admin {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin: 15px 0;
    background: #fafafa;
}

.mensaje-admin {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 6px;
}

.mensaje-usuario-admin {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.mensaje-otro-admin {
    background: #f5f5f5;
    border-left: 4px solid #757575;
}

.cabecera-mensaje-admin {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.contenido-mensaje-admin {
    color: #333;
}

.info-mensaje-admin {
    text-align: right;
    font-size: 11px;
    color: #888;
    margin-top: 5px;
}

.admin-conversation-info {
    background: #e8f5e8;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #4caf50;
}

.contactar-usuario-admin,
.form-contacto-admin {
    margin: 15px 0;
}

.info-contacto-admin {
    background: #fff3cd;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #ffc107;
}

.acciones-contacto-admin {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* =========================================================
   Estilos Mejorados para Tabla de Usuarios
   ========================================================= */

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.admin-table thead {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
}

.admin-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f5;
    color: #343a40;
    font-size: 0.95rem;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background-color: #f8f9fa;
}

/* Avatares */
.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.user-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Información del usuario */
.user-name {
    font-weight: 600;
    color: #212529;
}

.user-id-small {
    font-size: 0.75rem;
    color: #adb5bd;
    margin-top: 2px;
}

/* Badges */
.user-badges {
    display: flex;
    gap: 5px;
    align-items: center;
}

.badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-admin {
    background-color: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #bbdefb;
}

.badge-user {
    background-color: #f3f3f3;
    color: #666;
    border: 1px solid #e0e0e0;
}

.badge-verified {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    padding: 2px 6px;
    font-size: 0.8rem;
}

/* Botones de acción */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    color: #6c757d;
}

.btn-icon:hover {
    background-color: #e9ecef;
    color: var(--admin-primary);
}

/* Ajustes responsive */
@media (max-width: 768px) {

    .admin-table th:nth-child(1),
    /* Avatar */
    .admin-table td:nth-child(1),
    .admin-table th:nth-child(4),
    /* Email */
    .admin-table td:nth-child(4),
    .admin-table th:nth-child(6),
    /* Ciudad */
    .admin-table td:nth-child(6),
    .admin-table th:nth-child(7),
    /* Registro */
    .admin-table td:nth-child(7) {
        display: none;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px;
    }
}