﻿.contact-admin {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-admin__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 20px;
}

.header-left h1 {
    margin: 0;
    font-size: 24px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 14px;
}

.search-wrapper {
    position: relative;
}

    .search-wrapper i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
    }

    .search-wrapper input {
        padding: 10px 15px 10px 35px;
        border-radius: 8px;
        border: 1px solid #e2e8f0;
        width: 300px;
        outline: none;
        transition: all 0.2s;
    }

        .search-wrapper input:focus {
            border-color: #25D366;
            box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
        }

/* Tabla */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

    .admin-table th {
        padding: 12px;
        color: #64748b;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 11px;
        letter-spacing: 0.05em;
    }

    .admin-table tbody tr {
        background: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        transition: transform 0.2s;
    }

        .admin-table tbody tr:hover {
            transform: scale(1.005);
            background: #f8fafc;
        }

    .admin-table td {
        padding: 15px;
        border-top: 1px solid #f1f5f9;
        border-bottom: 1px solid #f1f5f9;
    }

        .admin-table td:first-child {
            border-left: 1px solid #f1f5f9;
            border-top-left-radius: 8px;
            border-bottom-left-radius: 8px;
        }

        .admin-table td:last-child {
            border-right: 1px solid #f1f5f9;
            border-top-right-radius: 8px;
            border-bottom-right-radius: 8px;
        }

/* Detalles */
.client-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-avatar {
    width: 35px;
    height: 35px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.client-name {
    display: block;
    font-weight: 600;
    color: #1e293b;
}

.client-id {
    font-size: 11px;
    color: #94a3b8;
}

.contact-links {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    gap: 4px;
}

.company-badge {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #475569;
    font-weight: 500;
}

.note-preview {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    font-size: 13px;
    color: #64748b;
    font-style: italic;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-action {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
}

.btn-edit {
    color: #3b82f6;
}

.btn-delete {
    color: #ef4444;
}

.btn-action:hover {
    transform: scale(1.2);
}


.side-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 2000;
    display: flex;
    justify-content: flex-end; /* Lo empuja a la derecha */
}

.side-panel {
    width: 100%;
    max-width: 450px;
    background: white;
    height: 100%;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    animation: slideLeft 0.3s ease-out;
}

@keyframes slideLeft {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.side-panel__header {
    padding: 20px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-icon {
    font-size: 20px;
    color: #25D366;
}

.header-content h3 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
}

.side-panel__body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.p-field {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .p-field label {
        font-size: 13px;
        font-weight: 600;
        color: #64748b;
    }

    .p-field input, .p-field textarea, .p-field select {
        padding: 10px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        font-size: 14px;
        outline: none;
        transition: border 0.2s;
    }

        .p-field input:focus {
            border-color: #25D366;
        }

.p-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.side-panel__footer {
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
}

.p-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.p-btn--save {
    background: #25D366;
    color: white;
}

.p-btn--cancel {
    background: #e2e8f0;
    color: #475569;
}
/* Estilo para campos deshabilitados */
.input-disabled {
    background: #f8fafc !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
    border: 1px solid #e2e8f0 !important;
}

.p-field small {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* 1. Contenedor al 100% del ancho disponible */
.contact-admin {
    padding: 25px 40px;
    width: 100%;
    max-width: 100% !important;
    margin: 0;
    box-sizing: border-box;
    background: #fdfdfd;
}

/* 2. Cabecera ajustada */
.contact-admin__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

/* 3. Buscador más ancho y legible */
.search-wrapper input {
    padding: 12px 15px 12px 40px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    width: 450px; /* Aumentamos de 300px a 450px */
    font-size: 15px; /* Letra un poco más grande para mejor lectura */
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

    .search-wrapper input:focus {
        width: 500px; /* Efecto sutil de expansión al enfocar */
        border-color: #25D366;
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
    }

/* 4. Ajuste para que la tabla use todo el espacio */
.admin-table {
    width: 100%;
    table-layout: auto; /* Permite que las columnas se expandan naturalmente */
}
/* Título con Contador */
.header-left h1 {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 26px;
    color: #1e293b;
}

.contact-count {
    background: #25D366;
    color: white;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(37, 211, 102, 0.2);
}