* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg,#023A69 0%, #1FBE71  100%);
    border-radius: 10px;
    color: white;
}

.header h1 {
    font-size: 1.8rem;
    
}

/* Mensajes */
.mensaje {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.mensaje.exito {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensaje.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
/* Modal de resultado */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-resultado {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalEntrar 0.3s ease-out;
}

@keyframes modalEntrar {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-icono {
    font-size: 4rem;
    margin-bottom: 15px;
}

.modal-icono.exito {
    color: #28a745;
}

.modal-icono.error {
    color: #dc3545;
}

.modal-titulo {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.modal-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: left;
}

.modal-info p {
    margin: 8px 0;
    color: #555;
}

.modal-info strong {
    color: #333;
}

.modal-btn {
    padding: 12px 40px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.modal-btn.exito {
    background: #1FBE71;
    color: white;
}

.modal-btn.error {
    background: #dc3545;
    color: white;
    opacity: 0.8;
}
   
.modal-btn.exito:hover{
    border-radius: 25px;
}

/* Estadísticas */

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-numero {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #023A69;
}

.stat-label {
    color: #023A69;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Filtros */
.filtros {
    display: flex;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    align-items: flex-end;
    justify-content: space-between;
    
}

.filtro-grupo {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filtro-grupo label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #023A69;
}

.filtro-grupo input,
.filtro-grupo select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 0.8rem;   
}
.filtro-grupo input:focus,
.filtro-grupo select:focus {
    border-color: #1FBE71;
    outline:none;
}
.filtro-grupo input {
    min-width: 600px;
}

.filtro-grupo select {
    min-width: 150px;
}

.filtro-botones {
    display: flex;
    margin-top: 10px;
    gap: 10px;
}

/* Botones */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}
.btn:hover {
    border-radius: 25px;
}

.btn-primary {
    background: #1FBE71;
    color: white;
    display:inline-flex;
    align-items: center;
    justify-content: center;
    gap:5px;
    border:2px solid transparent;
}


.btn-primary:focus {
    border-color: #023A69 ;
    outline:none;

}

.btn-danger {
    fill: #dc3545;
    background: transparent;
    opacity: 0.7;
    border:2px solid transparent; 
}

.btn-danger:hover {
    opacity: 1;
}
.btn-danger:focus{
    border-color:#dc3545;
    outline: none;
    
}

.btn-warning {
    background: transparent;
    fill:#023A69;
}

.btn-secondary {
    background: #023A69;
    color: white;
}
.btn-secondary:hover {
    border-radius: 25px;
}


/* Tabla */
.tabla-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

table tr:nth-child(even){
    background-color: #EBF6FF;

}
table tr:nth-child(odd){
    background-color: #ffffff;

}
table tbody tr:hover{
    background: #DCF9EC;
    
}
thead tr{
    background: linear-gradient(135deg, #1FBE71 0%,  #023A69 100%);
    
}
thead tr th{
    padding-left: 10px;
}

th, td {
    padding: 6px;
    text-align: center;
    border-bottom: 1px solid #eee;
    align-items: center;
    
}

th {
    font-weight: 600;
    color: #f8f9fa;
    text-transform: uppercase;
    
}
.break-word{
    word-break: break-all;
}

.input-table {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.8rem ;
    max-width: 80px;

}
.input-table:focus{
    border: 2px solid #1FBE71;
    outline: none;
}
.acciones {
    padding: 10px;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}


/* Fila gestionada - texto normal */
.fila-gestionada td {
    text-decoration: line-through;
    color: #7e7e7e;
    background-color: #cfcdcd;
}

/* Sincronizar */
.sync-form {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    align-items: center;
    display: flex;
    justify-content: center;
}
.sync-form input {
    padding:5px;
    cursor:text;
}

.sync-form .form-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: center;
}
.form-row input {
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
}
.form-row input:focus{
    border-color: #1FBE71;
    outline: none;
}
.form-row input input:focus{
    border: 2px solid #1FBE71;
    outline: none;
}

/* Formulario Editar */
.form-editar {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-editar h2 {
    margin-bottom: 20px;
    color: #333;
}

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

.form-grupo {
    display: flex;
    flex-direction: column;
    
}

.form-grupo label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-grupo input,
.form-grupo select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.8rem;
    
}
#gestionado,
#campana {
    cursor: pointer;
}

.form-acciones {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Sin datos */
.sin-datos {
    text-align: center;
    padding: 50px;
    color: #666;
}
/* Formulario en tabla */
.form-inline {
    display: contents;
}


.select-tabla {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    text-align: center;
    width: 80%;
    cursor: pointer;
    
    
}
.select-tabla:focus {
    border: 2px solid #1FBE71;
    outline: none;
}
.gestor{
    min-width: 110px;
}

.btn-small {
    padding: 5px;
    font-size: 0.85rem;
}

.btn-success {
    background-color: transparent;
    border:2px solid transparent;
}

.btn-success svg {
    fill: #28a745;
    transition: fill 0.2s ease-in-out;
    opacity: 0.8;
}

.btn-success:hover svg {
    opacity: 1;
}
.btn-success:focus{
    border-color:#28a745;
    outline:none;

}
.logout{
    color:#fff;
    font-weight: 600;
    border:1px solid transparent;
    text-decoration: none;
    border-radius: 5px;
    padding:5px;
      
}
.logout:hover{
    color:#dc3545;
}
.logout:focus{
    border:2px solid #dc3545;
    outline: none;

}

/* usuarios.php */
.header{
    display:flex;
    justify-content:space-between;
    height: 90px;
}
.header h1 {
    display:inline-flex;
    align-items: center;
}
.header h1 svg {
    fill:#fff;
    margin-right: 20px;
   
}
/* Enlace al perfil */
.header-nombre {
    text-decoration: none;
    color: white;
    transition: opacity 0.3s;
}

.header-nombre:hover {
    opacity: 0.8;
}

.header-nombre p {
    margin: 0;
}

.header-user {
    display: flex;
    align-items: center;
    margin-left: 30px;
    gap: 15px;
    
}

.header-user span {
    font-weight: 500;

}
.header-user a{
    display: inline-flex;
    

}
.header-user a svg{
    fill:#fff;
    margin-right: 5px;

}

.form-editar h2 {
    display:inline-flex;

}
.form-editar h2 svg{
    fill: #333;
}
.campo-readonly {
    display: block;
    padding: 12px 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #666;
    font-size: 1rem;
}
.button-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

/* Contenedor botón guardar todo */
.guardar-todo-container {
    margin-bottom: 20px;
    text-align: right;
}


/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .filtros {
        flex-direction: column;
    }
    
    .filtros input {
        min-width: 100%;
    }
}
