/* =========================================================
   PÁGINA CLIENTES
   ========================================================= */

.clientes-page {
    width: 100%;
}


/* =========================================================
   ENCABEZADO
   ========================================================= */

.clientes-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.clientes-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.6px;
}

.clientes-description {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 12px;
}


/* =========================================================
   BOTÓN NUEVO CLIENTE
   ========================================================= */

.btn-new-client {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 16px;

    background: var(--primary);
    border-color: var(--primary);

    border-radius: 8px;

    font-size: 12px;
    font-weight: 600;
}

.btn-new-client:hover,
.btn-new-client:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}


/* =========================================================
   TOTAL CLIENTES
   ========================================================= */

.client-stat-wrapper {
    width: 100%;
    margin-bottom: 24px;
}

.client-stat-card {
    display: flex;
    align-items: center;
    gap: 15px;

    width: 100%;
    min-height: 105px;

    padding: 20px;

    background: #fff;

    border: 1px solid var(--border);
    border-radius: 13px;

    box-shadow: var(--shadow);
}

.client-stat-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: #2563eb;
    background: #eff6ff;

    border-radius: 11px;

    font-size: 20px;
}

.client-stat-card span {
    display: block;

    margin-bottom: 3px;

    color: var(--text-muted);

    font-size: 11px;
}

.client-stat-card strong {
    display: block;

    color: var(--text);

    font-size: 24px;
    line-height: 1;
}


/* =========================================================
   LISTADO
   ========================================================= */

.clients-list-card {
    overflow: hidden;

    width: 100%;

    background: #fff;

    border: 1px solid var(--border);
    border-radius: 13px;

    box-shadow: var(--shadow);
}


/* =========================================================
   HEADER DEL LISTADO
   ========================================================= */

.clients-list-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    padding: 22px 23px;

    border-bottom: 1px solid var(--border);
}

.clients-list-header h3 {
    margin: 0;

    color: var(--text);

    font-size: 17px;
    font-weight: 700;
}


/* =========================================================
   BUSCADOR
   ========================================================= */

.client-search {
    position: relative;

    width: 260px;
}

.client-search i {
    position: absolute;

    top: 50%;
    left: 13px;

    color: #9aa2b1;

    font-size: 13px;

    transform: translateY(-50%);
}

.client-search input {
    width: 100%;
    height: 38px;

    padding: 0 13px 0 36px;

    color: var(--text);

    background: #f8f9fc;

    border: 1px solid var(--border);
    border-radius: 8px;

    outline: none;

    font-size: 11px;

    transition: all 0.2s ease;
}

.client-search input:focus {
    background: #fff;

    border-color: #bfdbfe;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.08);
}


/* =========================================================
   TABLA
   ========================================================= */

.clients-table {
    min-width: 700px;

    margin: 0;
}

.clients-table thead th {
    padding: 14px 20px;

    color: #8a93a5;
    background: #fafbfc;

    border-bottom: 1px solid var(--border);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 0.8px;

    white-space: nowrap;
}

.clients-table tbody td {
    padding: 17px 20px;

    vertical-align: middle;

    border-bottom: 1px solid var(--border);
}

.clients-table tbody tr:last-child td {
    border-bottom: 0;
}

.clients-table tbody tr {
    transition: background 0.15s ease;
}

.clients-table tbody tr:hover {
    background: #fafcff;
}


/* =========================================================
   CLIENTE
   ========================================================= */

.client-name {
    display: flex;
    align-items: center;

    gap: 11px;

    min-width: 230px;
}

.client-avatar {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color: #2563eb;
    background: #eff6ff;

    border-radius: 10px;

    font-size: 10px;
    font-weight: 700;
}

.client-name strong {
    display: block;

    color: var(--text);

    font-size: 11px;
    font-weight: 600;
}


/* =========================================================
   TELÉFONO
   ========================================================= */

.client-contact {
    display: flex;
    align-items: center;
}

.client-contact span {
    color: #697386;

    font-size: 10px;

    white-space: nowrap;
}

.client-contact i {
    width: 15px;

    margin-right: 4px;

    color: #9aa2b1;
}


/* =========================================================
   DIRECCIÓN
   ========================================================= */

.client-address {
    display: block;

    max-width: 260px;

    color: #697386;

    font-size: 10px;

    line-height: 1.5;
}


/* =========================================================
   ACCIONES
   ========================================================= */

.client-actions {
    display: flex;
    justify-content: flex-end;

    gap: 5px;
}

.action-btn {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #7b8497;
    background: #f8f9fc;

    border: 1px solid var(--border);
    border-radius: 7px;

    cursor: pointer;

    font-size: 12px;

    transition: all 0.2s ease;
}

.action-btn:hover {
    color: var(--primary);

    background: var(--primary-soft);

    border-color: #dbeafe;
}

.action-btn.delete-client:hover {
    color: #dc2626;

    background: #fef2f2;

    border-color: #fecaca;
}


/* =========================================================
   FOOTER
   ========================================================= */

.clients-list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 20px;

    border-top: 1px solid var(--border);
}

.clients-list-footer>span {
    color: #8a93a5;

    font-size: 10px;
}

.clients-list-footer strong {
    color: var(--text);
}


/* =========================================================
   PAGINACIÓN
   ========================================================= */

.clients-pagination {
    display: flex;
    align-items: center;

    gap: 4px;
}

.pagination-btn {
    min-width: 29px;
    height: 29px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 7px;

    color: #7b8497;
    background: #fff;

    border: 1px solid var(--border);
    border-radius: 6px;

    font-size: 10px;

    cursor: pointer;
}

.pagination-btn:hover {
    color: var(--primary);

    border-color: #bfdbfe;
}

.pagination-btn.active {
    color: #fff;

    background: var(--primary);

    border-color: var(--primary);
}

.pagination-btn.disabled {
    color: #c5cad3;

    cursor: default;
}


/* =========================================================
   MODALES
   ========================================================= */

.client-modal {
    overflow: hidden;

    border: 0;

    border-radius: 14px;

    box-shadow:
        0 25px 60px rgba(17, 24, 39, 0.18);
}

.client-modal .modal-header {
    padding: 22px 25px;

    border-bottom: 1px solid var(--border);
}

.client-modal .modal-title {
    margin: 0;

    color: var(--text);

    font-size: 18px;
    font-weight: 700;
}

.client-modal .modal-body {
    padding: 25px;
}

.client-modal .modal-footer {
    padding: 16px 25px;

    border-top: 1px solid var(--border);
}


/* =========================================================
   LABELS
   ========================================================= */

.client-modal label {
    display: block;

    margin-bottom: 7px;

    color: #4b5563;

    font-size: 11px;
    font-weight: 600;
}


/* =========================================================
   INPUTS
   ========================================================= */

.client-modal .form-control {
    min-height: 40px;

    color: var(--text);

    background-color: #fff;

    border: 1px solid #e1e5ec;

    border-radius: 8px;

    font-size: 11px;
}

.client-modal .form-control:focus {
    border-color: #93c5fd;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.08);
}


/* =========================================================
   INPUT CON ICONO
   ========================================================= */

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;

    z-index: 2;

    top: 50%;
    left: 13px;

    color: #9aa2b1;

    transform: translateY(-50%);

    font-size: 13px;
}

.input-icon .form-control {
    padding-left: 36px;
}


/* =========================================================
   BOTÓN MODAL
   ========================================================= */

.client-modal .btn-primary {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    background: var(--primary);
    border-color: var(--primary);

    font-size: 11px;
    font-weight: 600;
}


/* =========================================================
   MODAL ELIMINAR
   ========================================================= */

.client-delete-modal {
    padding: 28px;

    text-align: center;

    border: 0;

    border-radius: 14px;
}

.delete-icon {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 15px;

    color: #dc2626;
    background: #fef2f2;

    border-radius: 50%;

    font-size: 19px;
}

.client-delete-modal h5 {
    margin: 0 0 8px;

    color: var(--text);

    font-size: 16px;
    font-weight: 700;
}

.client-delete-modal p {
    max-width: 280px;

    margin: 0 auto 20px;

    color: var(--text-muted);

    font-size: 11px;

    line-height: 1.6;
}

.delete-actions {
    display: flex;
    justify-content: center;

    gap: 8px;
}

.delete-actions .btn {
    min-width: 90px;

    font-size: 11px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 767.98px) {

    .clientes-header {
        align-items: flex-start;

        flex-direction: column;
    }

    .clientes-header h2 {
        font-size: 23px;
    }

    .btn-new-client {
        width: 100%;

        justify-content: center;
    }

    .clients-list-header {
        align-items: flex-start;

        flex-direction: column;
    }

    .client-search {
        width: 100%;
    }

    .clients-list-footer {
        align-items: flex-start;

        flex-direction: column;

        gap: 12px;
    }

    .clients-pagination {
        width: 100%;

        justify-content: flex-end;
    }

}