﻿/* Estilos específicos para la página de Enviar Mensajes */
.mensajes-root {
    min-height: 100vh;
    background: #f3f6fb;
    color: #1f2937;
    width: 100%;
    display: flex;
    font-family: sans-serif;
}

    .mensajes-root * {
        box-sizing: border-box;
    }

    .mensajes-root .container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 20px;
    }

    /* --- ESTILOS REUTILIZADOS DE SIDEBAR Y HEADER --- */
    .mensajes-root .sidebar {
        width: 250px;
        background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
        color: white;
        padding: 20px 0;
        position: fixed;
        height: 100vh;
        z-index: 100;
        transition: all 0.3s ease;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    }

    .mensajes-root .sidebar-header {
        padding: 0 20px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mensajes-root .logo {
        font-size: 2rem;
        font-weight: 700;
        text-decoration: none;
        background: linear-gradient(45deg, #ffffff, #f0f9ff, #dbeafe);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .mensajes-root .sidebar-nav {
        padding: 20px 0;
    }

    .mensajes-root .nav-item {
        display: flex;
        align-items: center;
        padding: 12px 20px;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        transition: all 0.3s ease;
        border-left: 4px solid transparent;
        cursor: pointer;
    }

        .mensajes-root .nav-item:hover {
            background: rgba(255, 255, 255, 0.1);
            color: white;
            border-left-color: rgba(255, 255, 255, 0.3);
        }

        .mensajes-root .nav-item.active {
            background: rgba(255, 255, 255, 0.15);
            color: white;
            border-left-color: white;
        }

    .mensajes-root .nav-icon {
        font-size: 1.2rem;
        margin-right: 15px;
        width: 24px;
        text-align: center;
    }

    .mensajes-root .nav-text {
        font-size: 0.95rem;
        font-weight: 500;
    }

    .mensajes-root .main-content-wrapper {
        flex: 1;
        margin-left: 250px;
        transition: all 0.3s ease;
    }

    .mensajes-root .header {
        background: white;
        padding: 15px 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        position: sticky;
        top: 0;
        z-index: 50;
    }

    .mensajes-root .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .mensajes-root .sidebar-toggle {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: #1e3a8a;
        display: none;
        padding: 5px 10px;
    }

    .mensajes-root .user-info-container {
        display: flex;
        justify-content: flex-end;
        margin-left: auto;
    }

    .mensajes-root .user-info {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .mensajes-root .user-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: linear-gradient(45deg, #059669, #10b981);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 1.1rem;
        color: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

        .mensajes-root .user-avatar:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
        }

    .mensajes-root .user-details {
        text-align: right;
    }

    .mensajes-root .user-name {
        font-weight: 600;
        font-size: 0.95rem;
    }

    .mensajes-root .user-role {
        font-size: 0.85rem;
        opacity: 0.8;
    }

    .mensajes-root .return-btn {
        background: rgba(220, 38, 38, 0.1);
        border: 1px solid rgba(220, 38, 38, 0.2);
        color: #dc2626;
        padding: 8px 16px;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }

        .mensajes-root .return-btn:hover {
            background: rgba(220, 38, 38, 0.2);
            transform: translateY(-2px);
        }

    .mensajes-root .main-content {
        padding: 30px 0;
    }

    /* Page Header */
    .mensajes-root .page-header {
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
        border-radius: 20px;
        padding: 30px 40px;
        margin-bottom: 30px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }

    .mensajes-root .page-title {
        font-size: 2.2rem;
        font-weight: 700;
        color: #1e3a8a;
        margin-bottom: 10px;
    }

    .mensajes-root .page-subtitle {
        font-size: 1.1rem;
        color: #64748b;
    }

    /* --- ESTILOS DE CONTENIDO PRINCIPAL --- */
    .mensajes-root .tab-content {
        background: white;
        border-radius: 20px;
        padding: 30px 40px;
        box-shadow: 0 10px 40px rgba(220, 225, 240, 0.7);
        border: 1px solid #e2e8f0;
        margin-bottom: 40px;
    }

    .mensajes-root .table-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 25px;
        gap: 20px;
        flex-wrap: wrap;
        padding-bottom: 20px;
        border-bottom: 2px solid #f1f5f9;
    }

    .mensajes-root .table-title {
        font-size: 1.6rem;
        color: #1e3a8a;
        margin: 0;
    }

    .mensajes-root .process-btn {
        background: linear-gradient(135deg, #059669, #10b981);
        color: white;
        border: none;
        padding: 12px 25px;
        border-radius: 10px;
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    }

        .mensajes-root .process-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
        }

    /* --- ESTILOS DE TABLA --- */
    .mensajes-root .table-container {
        overflow-x: auto;
        margin-bottom: 30px;
    }

    .mensajes-root .admin-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 8px;
        font-size: 0.95rem;
    }

        .mensajes-root .admin-table th {
            text-align: left;
            padding: 15px 20px;
            background: transparent;
            color: #64748b;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.8rem;
            letter-spacing: 0.5px;
            border-bottom: 2px solid #e2e8f0;
        }

        .mensajes-root .admin-table td {
            padding: 20px;
            border: none;
            background: #fdfdff;
            color: #334155;
            vertical-align: middle;
        }

        .mensajes-root .admin-table tr.data-row {
            transition: all 0.2s ease-in-out;
            border-radius: 12px;
            box-shadow: 0 2px 10px -2px rgba(220, 225, 240, 0.6);
            border: 1px solid #f0f3f8;
        }

            .mensajes-root .admin-table tr.data-row:hover {
                transform: translateY(-3px) scale(1.01);
                background: #ffffff;
                box-shadow: 0 10px 30px -5px rgba(200, 205, 220, 0.9);
            }

        .mensajes-root .admin-table tr td:first-child {
            border-top-left-radius: 12px;
            border-bottom-left-radius: 12px;
        }

        .mensajes-root .admin-table tr td:last-child {
            border-top-right-radius: 12px;
            border-bottom-right-radius: 12px;
        }

    .mensajes-root .actions-cell {
        text-align: center;
    }

    /* Estilos para celdas de cliente */
    .mensajes-root .client-name-cell {
        font-weight: 600;
        color: #334155;
        font-size: 1.05rem;
    }

    .mensajes-root .client-phone-cell {
        font-size: 0.9rem;
        color: #64748b;
        font-family: monospace;
    }

    /* Estilo para botón de Enviar Individual */
    .mensajes-root .action-btn.send-one-btn {
        background: #eef2ff;
        color: #4338ca;
        border: 2px solid #e0e7ff;
        padding: 8px 15px;
        border-radius: 8px;
        font-weight: 600;
        font-size: 0.85rem;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: all 0.3s ease;
    }

        .mensajes-root .action-btn.send-one-btn:hover {
            background: #e0e7ff;
            transform: translateY(-2px);
        }

    /* Status Badge */
    .mensajes-root .status-badge {
        padding: 5px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 600;
        display: inline-block;
    }

        .mensajes-root .status-badge.active {
            background: rgba(16, 185, 129, 0.1);
            color: #059669;
        }

        .mensajes-root .status-badge.inactive {
            background: #fef2f2;
            color: #dc2626;
            border: 1px solid #fecaca;
        }

    .mensajes-root .important-note {
        background-color: #fffbeb;
        color: #b45309;
        border: 1px solid #fde68a;
        padding: 15px 20px;
        border-radius: 12px;
        font-size: 0.9rem;
        line-height: 1.6;
    }

        .mensajes-root .important-note strong {
            color: #92400e;
        }

    /* --- ESTILOS DE PAGINACIÓN AÑADIDOS --- */
    .mensajes-root .pagination-controls {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 25px;
        padding-top: 25px;
        border-top: 2px solid #f1f5f9;
    }

    .mensajes-root .pagination-btn {
        background: #f8fafc;
        color: #64748b;
        border: 2px solid #e2e8f0;
        padding: 8px 16px;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }

        .mensajes-root .pagination-btn:hover:not(:disabled) {
            background: #f1f5f9;
            border-color: #cbd5e1;
        }

        .mensajes-root .pagination-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }


/* Responsive */
@media (max-width: 768px) {
    .mensajes-root .sidebar {
        transform: translateX(-100%);
    }

        .mensajes-root .sidebar.active {
            transform: translateX(0);
        }

    .mensajes-root .main-content-wrapper {
        margin-left: 0;
    }

    .mensajes-root .sidebar-toggle {
        display: block;
    }

    .mensajes-root .user-details {
        display: none;
    }

    .mensajes-root .tab-content {
        padding: 20px;
    }
}
