/* ============================================
   GMS CLIENTS MANAGER - ESTILOS PERSONALIZADOS
   ============================================ */
body.page.page-id-7118 {
    background: #f8f9fa ! IMPORTANT;
}
#clients-table tbody tr:nth-child(2n+1) td {
    background: transparent !important;
}

#clients-table thead th:nth-child(1) {
    width: 100px !important;
}

tr.child td.child ul.dtr-details li span.dtr-title:after {
    content: ":";
}

tr.gms-row-expiring td:nth-child(3):before{
    content: "⚠️" !important;
}

tr.gms-row-expired td:nth-child(3):before{
    content: "🔴" !important;
}

tr td:nth-child(3):before{
    content: "✅" !important;
    margin-right: 3px
}

/* Reset y contenedor principal */
.gms-clients-wrapper {
    max-width: 1400px;
    margin: 0px auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    border-radius: 10px;
}

/* ============================================
   HEADER
   ============================================ */
.gms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gms-header h1 {
    margin: 0;
    font-size: 28px;
    color: #2c3e50;
    font-weight: 600;
}

/* ============================================
   BOTONES
   ============================================ */
.gms-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.gms-btn-icon {
    font-size: 16px;
}

.gms-btn-primary {
    background: #3498db;
    color: white;
}

.gms-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.gms-btn-success {
    background: #27ae60;
    color: white;
}

.gms-btn-success:hover {
    background: #229954;
}

.gms-btn-secondary {
    background: #95a5a6;
    color: white;
}

.gms-btn-secondary:hover {
    background: #7f8c8d;
}

.gms-btn-warning {
    background: #f39c12;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.gms-btn-warning:hover {
    background: #e67e22;
}

.gms-btn-danger {
    background: #e74c3c;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.gms-btn-danger:hover {
    background: #c0392b;
}

/* ============================================
   TABLA
   ============================================ */
.gms-table-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
}

#clients-table {
    width: 100% !important;
}

#clients-table thead th {
    background: #34495e;
    color: white;
    font-weight: 600;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 2px solid #2c3e50;
}

#clients-table thead th:nth-child(3) {
    width: 180px !important;
}

#clients-table tbody td {
    padding: 10px 8px;
    border-bottom: 1px solid #ecf0f1;
}

#clients-table tbody td:nth-child(2), #clients-table tbody td:nth-child(4) {
    text-align: left;
}

#clients-table tbody tr:hover {
    background: #f8f9fa;
}

.gms-table-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

/* ============================================
   MODAL
   ============================================ */
.gms-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.gms-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gms-modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease;
}

.gms-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ecf0f1;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.gms-modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: #2c3e50;
}

.gms-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #95a5a6;
    cursor: pointer;
    transition: color 0.3s;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
}

.gms-modal-close:hover {
    color: #e74c3c;
}

.gms-modal-body {
    padding: 20px;
}

/* ============================================
   FORMULARIO
   ============================================ */
.gms-form-group {
    margin-bottom: 20px;
}

.gms-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

.gms-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.gms-form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.gms-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

div#form-fields{
    max-height: 450px;
    overflow-y: scroll;
}
/* ============================================
   LOADER
   ============================================ */
.gms-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gms-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

.gms-loader p {
    margin-top: 15px;
    color: #34495e;
    font-weight: 600;
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .gms-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .gms-header h1 {
        font-size: 22px;
    }
    
    .gms-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .gms-table-actions {
        flex-direction: column;
    }
    
    .gms-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media (max-width: 540px) {
    .gms-header>div {
        display: flex;
        flex-direction: column;
        width: 100% !important;
    }
    .gms-header h1 {
        padding-top: 10px;
    }
}
/* ============================================
   DATATABLE CUSTOMIZATION
   ============================================ */
div#clients-table_filter label {
    display: flex;
}
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    padding: 6px 12px;
    margin-left: 8px;
}
div#clients-table_length label{
    display: flex;
    justify-content: flex-end;
}
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    padding: 4px 8px;
    height: fit-content;
    margin: 0 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 4px 10px;
    margin: 0 2px;
    border-radius: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #3498db;
    color: white !important;
    border: 1px solid #3498db;
}

/* ============================================
   MENSAJES DE ERROR
   ============================================ */
.gms-error {
    background: #fee;
    color: #c00;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #c00;
    margin: 20px 0;
}
.gms-error.gms-permissions-disabled{
    width: fit-content;
    margin: 5% auto 0;
    text-align: center;
}

.gms-success {
    background: #efe;
    color: #060;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #060;
    margin: 20px 0;
}


/* ============================================
   ESTADOS DE FILAS POR FECHA DE EXPIRACIÓN
   ============================================ */

/* Fila próxima a vencer (≤20 días) */
.gms-row-expiring {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107;
}

.gms-row-expiring:hover {
    background-color: #ffe69c !important;
}

/* Fila vencida (<0 días) */
.gms-row-expired {
    background-color: #f8d7da !important;
    border-left: 4px solid #dc3545;
}

.gms-row-expired:hover {
    background-color: #f1b0b7 !important;
}

/* Asegurar que el texto sea legible */
.gms-row-expiring td,
.gms-row-expired td {
    color: #212529;
}

/* Iconos de fecha más visibles */
#clients-table tbody td {
    font-size: 14px;
}

/* ============================================
   ESTILOS PARA LINKS EN LA TABLA
   ============================================ */

.gms-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.gms-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Icono de enlace externo (opcional) */
.gms-link::after {
    content: " 🔗";
    font-size: 12px;
    opacity: 0.6;
    margin-left: 4px;
}

.dtfh-floatingparent.dtfh-floatingparenthead thead#table-head tr th{
    background: #34495e;
    color: white;
    font-weight: 600;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 2px solid #2c3e50;
}

@media (min-width: 991px) {
.gms-header {
  transition: all 0.3s ease;
}

/*.gms-header.fijo {
  position: fixed;
  top: 32px;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  max-width: 1360px;
  margin: 0 auto;
}*/

.dtfh-floatingparent.dtfh-floatingparenthead {
    top: 31px !important;
}

}